1 # Copyright (C) 2007-2011 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.
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
22 # Generated python file of Graph GraphInLinesUnValid
26 GraphInLinesUnValid = Graph( 'GraphInLinesUnValid' )
27 GraphInLinesUnValid.SetName( 'GraphInLinesUnValid' )
28 GraphInLinesUnValid.SetAuthor( '' )
29 GraphInLinesUnValid.SetComment( '' )
30 GraphInLinesUnValid.Coords( 0 , 0 )
32 # Creation of Factory Nodes
34 # Creation of InLine Nodes
36 PyAdd.append( 'def Add(a,b) : ' )
37 PyAdd.append( ' return a+b ' )
39 Add = GraphInLinesUnValid.INode( 'Add' , PyAdd )
40 Add.InPort( 'a' , 'long' )
41 Add.InPort( 'b' , 'long' )
42 Add.OutPort( 'f' , 'long' )
45 Add.SetComment( 'Python function' )
46 Add.Coords( 257 , 13 )
49 PySub.append( 'def Sub(a,b) : ' )
50 PySub.append( ' return a-b ' )
52 Sub = GraphInLinesUnValid.INode( 'Sub' , PySub )
53 Sub.InPort( 'a' , 'long' )
54 Sub.InPort( 'b' , 'long' )
55 Sub.OutPort( 'f' , 'long' )
58 Sub.SetComment( 'Python function' )
59 Sub.Coords( 20 , 152 )
62 PyMul.append( 'def Mul(a,b) : ' )
63 PyMul.append( ' return a*b ' )
64 Mul = GraphInLinesUnValid.INode( 'Mul' , PyMul )
65 Mul.InPort( 'a' , 'long' )
66 Mul.InPort( 'b' , 'long' )
67 Mul.OutPort( 'Result' , 'long' )
70 Mul.SetComment( 'Python function' )
71 Mul.Coords( 469 , 125 )
74 Addf = Add.Port( 'f' )
75 Mula = GraphInLinesUnValid.Link( Addf , Mul.Port( 'a' ) )
76 Mula.AddCoord( 1 , 451 , 205 )
77 Mula.AddCoord( 2 , 450 , 93 )
79 Subf = Sub.Port( 'f' )
80 Mulb = GraphInLinesUnValid.Link( Subf , Mul.Port( 'b' ) )
82 Addb = GraphInLinesUnValid.Link( Subf , Add.Port( 'b' ) )
83 Addb.AddCoord( 1 , 235 , 122 )
84 Addb.AddCoord( 2 , 236 , 232 )
86 MulResult = Mul.Port( 'Result' )
87 Adda = GraphInLinesUnValid.Link( MulResult , Add.Port( 'a' ) )
88 Adda.AddCoord( 1 , 8 , 92 )
89 Adda.AddCoord( 2 , 7 , 332 )
90 Adda.AddCoord( 3 , 645 , 334 )
91 Adda.AddCoord( 4 , 645 , 204 )
93 statexec = GraphInLinesUnValid.IsExecutable()
95 print "ERROR : GraphInLinesUnValid should not be executable"
97 print "Ok : GraphInLinesUnValid is not executable"
99 # Creation of Output variables
100 statrun = GraphInLinesUnValid.Run()
102 print "ERROR : GraphInLinesUnValid should not run"
104 print "Ok : GraphInLinesUnValid does not run"