1 # Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # Generated python file of Graph GraphInLinesUnValid
27 GraphInLinesUnValid = Graph( 'GraphInLinesUnValid' )
28 GraphInLinesUnValid.SetName( 'GraphInLinesUnValid' )
29 GraphInLinesUnValid.SetAuthor( '' )
30 GraphInLinesUnValid.SetComment( '' )
31 GraphInLinesUnValid.Coords( 0 , 0 )
33 # Creation of Factory Nodes
35 # Creation of InLine Nodes
37 PyAdd.append( 'def Add(a,b) : ' )
38 PyAdd.append( ' return a+b ' )
40 Add = GraphInLinesUnValid.INode( 'Add' , PyAdd )
41 Add.InPort( 'a' , 'long' )
42 Add.InPort( 'b' , 'long' )
43 Add.OutPort( 'f' , 'long' )
46 Add.SetComment( 'Python function' )
47 Add.Coords( 257 , 13 )
50 PySub.append( 'def Sub(a,b) : ' )
51 PySub.append( ' return a-b ' )
53 Sub = GraphInLinesUnValid.INode( 'Sub' , PySub )
54 Sub.InPort( 'a' , 'long' )
55 Sub.InPort( 'b' , 'long' )
56 Sub.OutPort( 'f' , 'long' )
59 Sub.SetComment( 'Python function' )
60 Sub.Coords( 20 , 152 )
63 PyMul.append( 'def Mul(a,b) : ' )
64 PyMul.append( ' return a*b ' )
65 Mul = GraphInLinesUnValid.INode( 'Mul' , PyMul )
66 Mul.InPort( 'a' , 'long' )
67 Mul.InPort( 'b' , 'long' )
68 Mul.OutPort( 'Result' , 'long' )
71 Mul.SetComment( 'Python function' )
72 Mul.Coords( 469 , 125 )
75 Addf = Add.Port( 'f' )
76 Mula = GraphInLinesUnValid.Link( Addf , Mul.Port( 'a' ) )
77 Mula.AddCoord( 1 , 451 , 205 )
78 Mula.AddCoord( 2 , 450 , 93 )
80 Subf = Sub.Port( 'f' )
81 Mulb = GraphInLinesUnValid.Link( Subf , Mul.Port( 'b' ) )
83 Addb = GraphInLinesUnValid.Link( Subf , Add.Port( 'b' ) )
84 Addb.AddCoord( 1 , 235 , 122 )
85 Addb.AddCoord( 2 , 236 , 232 )
87 MulResult = Mul.Port( 'Result' )
88 Adda = GraphInLinesUnValid.Link( MulResult , Add.Port( 'a' ) )
89 Adda.AddCoord( 1 , 8 , 92 )
90 Adda.AddCoord( 2 , 7 , 332 )
91 Adda.AddCoord( 3 , 645 , 334 )
92 Adda.AddCoord( 4 , 645 , 204 )
94 statexec = GraphInLinesUnValid.IsExecutable()
96 print "ERROR : GraphInLinesUnValid should not be executable"
98 print "Ok : GraphInLinesUnValid is not executable"
100 # Creation of Output variables
101 statrun = GraphInLinesUnValid.Run()
103 print "ERROR : GraphInLinesUnValid should not run"
105 print "Ok : GraphInLinesUnValid does not run"