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 GraphInLines
27 GraphInLines = Graph( 'GraphInLines' )
28 GraphInLines.SetName( 'GraphInLines' )
29 GraphInLines.SetAuthor( '' )
30 GraphInLines.SetComment( '' )
31 GraphInLines.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 = GraphInLines.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( 351 , 77 )
50 PySub.append( 'def Sub(a,b) : ' )
51 PySub.append( ' return a-b ' )
53 Sub = GraphInLines.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( 86 , 333 )
63 PyMul.append( 'def Mul(a,b) : ' )
64 PyMul.append( ' return a*b ' )
65 Mul = GraphInLines.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( 616 , 247 )
75 Addf = Add.Port( 'f' )
76 Mula = GraphInLines.Link( Addf , Mul.Port( 'a' ) )
77 Mula.AddCoord( 1 , 569 , 326 )
78 Mula.AddCoord( 2 , 569 , 158 )
80 Subf = Sub.Port( 'f' )
81 Mulb = GraphInLines.Link( Subf , Mul.Port( 'b' ) )
82 Mulb.AddCoord( 1 , 283 , 358 )
83 Mulb.AddCoord( 2 , 281 , 413 )
85 Addb = GraphInLines.Link( Subf , Add.Port( 'b' ) )
86 Addb.AddCoord( 1 , 283 , 187 )
87 Addb.AddCoord( 2 , 282 , 356 )
88 Addb.AddCoord( 3 , 281 , 414 )
90 # Creation of Input datas
91 Adda = Add.Input( 'a' , 1)
92 Suba = Sub.Input( 'a' , 3)
93 Subb = Sub.Input( 'b' , 4)
95 # Creation of Output variables
96 MulResult = Mul.Port( 'Result' )
102 GraphInLines.PrintPorts()