1 # Copyright (C) 2007-2015 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 aNewDataFlow_1_4
27 # Graph creation of aNewDataFlow_1_4
28 def DefaNewDataFlow_1_4() :
29 aNewDataFlow_1_4 = Graph( 'aNewDataFlow_1_4' )
30 aNewDataFlow_1_4.SetName( 'aNewDataFlow_1_4' )
31 aNewDataFlow_1_4.SetAuthor( '' )
32 aNewDataFlow_1_4.SetComment( '' )
33 aNewDataFlow_1_4.Coords( 0 , 0 )
35 # Creation of Factory Nodes
37 TranslateDXDYDZ = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'TranslateDXDYDZ' )
38 TranslateDXDYDZ.SetName( 'TranslateDXDYDZ' )
39 TranslateDXDYDZ.SetAuthor( '' )
40 TranslateDXDYDZ.SetContainer( 'localhost/FactoryServer' )
41 TranslateDXDYDZ.SetComment( 'TranslateDXDYDZ from GEOM_Superv' )
42 TranslateDXDYDZ.Coords( 1051 , 118 )
43 ITranslateDXDYDZtheObject = TranslateDXDYDZ.GetInPort( 'theObject' )
44 ITranslateDXDYDZtheDX = TranslateDXDYDZ.GetInPort( 'theDX' )
45 ITranslateDXDYDZtheDY = TranslateDXDYDZ.GetInPort( 'theDY' )
46 ITranslateDXDYDZtheDZ = TranslateDXDYDZ.GetInPort( 'theDZ' )
47 ITranslateDXDYDZGate = TranslateDXDYDZ.GetInPort( 'Gate' )
48 OTranslateDXDYDZreturn = TranslateDXDYDZ.GetOutPort( 'return' )
49 OTranslateDXDYDZGate = TranslateDXDYDZ.GetOutPort( 'Gate' )
51 MakeCopy = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeCopy' )
52 MakeCopy.SetName( 'MakeCopy' )
53 MakeCopy.SetAuthor( '' )
54 MakeCopy.SetContainer( 'localhost/FactoryServer' )
55 MakeCopy.SetComment( 'MakeCopy from GEOM_Superv' )
56 MakeCopy.Coords( 656 , 101 )
57 IMakeCopytheOriginal = MakeCopy.GetInPort( 'theOriginal' )
58 IMakeCopyGate = MakeCopy.GetInPort( 'Gate' )
59 OMakeCopyreturn = MakeCopy.GetOutPort( 'return' )
60 OMakeCopyGate = MakeCopy.GetOutPort( 'Gate' )
62 MakeBox = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeBox' )
63 MakeBox.SetName( 'MakeBox' )
64 MakeBox.SetAuthor( '' )
65 MakeBox.SetContainer( 'localhost/FactoryServer' )
66 MakeBox.SetComment( 'MakeBox from GEOM_Superv' )
67 MakeBox.Coords( 219 , 14 )
68 IMakeBoxtheX1 = MakeBox.GetInPort( 'theX1' )
69 IMakeBoxtheY1 = MakeBox.GetInPort( 'theY1' )
70 IMakeBoxtheZ1 = MakeBox.GetInPort( 'theZ1' )
71 IMakeBoxtheX2 = MakeBox.GetInPort( 'theX2' )
72 IMakeBoxtheY2 = MakeBox.GetInPort( 'theY2' )
73 IMakeBoxtheZ2 = MakeBox.GetInPort( 'theZ2' )
74 IMakeBoxGate = MakeBox.GetInPort( 'Gate' )
75 OMakeBoxreturn = MakeBox.GetOutPort( 'return' )
76 OMakeBoxGate = MakeBox.GetOutPort( 'Gate' )
78 MakeCopy_1 = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeCopy' )
79 MakeCopy_1.SetName( 'MakeCopy_1' )
80 MakeCopy_1.SetAuthor( '' )
81 MakeCopy_1.SetContainer( 'localhost/FactoryServer' )
82 MakeCopy_1.SetComment( 'MakeCopy from GEOM_Superv' )
83 MakeCopy_1.Coords( 1286 , 14 )
84 IMakeCopy_1theOriginal = MakeCopy_1.GetInPort( 'theOriginal' )
85 IMakeCopy_1Gate = MakeCopy_1.GetInPort( 'Gate' )
86 OMakeCopy_1return = MakeCopy_1.GetOutPort( 'return' )
87 OMakeCopy_1Gate = MakeCopy_1.GetOutPort( 'Gate' )
89 MakeFuse = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeFuse' )
90 MakeFuse.SetName( 'MakeFuse' )
91 MakeFuse.SetAuthor( '' )
92 MakeFuse.SetContainer( 'localhost/FactoryServer' )
93 MakeFuse.SetComment( 'MakeFuse from GEOM_Superv' )
94 MakeFuse.Coords( 1549 , 146 )
95 IMakeFusetheShape1 = MakeFuse.GetInPort( 'theShape1' )
96 IMakeFusetheShape2 = MakeFuse.GetInPort( 'theShape2' )
97 IMakeFuseGate = MakeFuse.GetInPort( 'Gate' )
98 OMakeFusereturn = MakeFuse.GetOutPort( 'return' )
99 OMakeFuseGate = MakeFuse.GetOutPort( 'Gate' )
101 MakeSphere = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeSphere' )
102 MakeSphere.SetName( 'MakeSphere' )
103 MakeSphere.SetAuthor( '' )
104 MakeSphere.SetContainer( 'localhost/FactoryServer' )
105 MakeSphere.SetComment( 'MakeSphere from GEOM_Superv' )
106 MakeSphere.Coords( 1749 , 41 )
107 IMakeSpheretheX = MakeSphere.GetInPort( 'theX' )
108 IMakeSpheretheY = MakeSphere.GetInPort( 'theY' )
109 IMakeSpheretheZ = MakeSphere.GetInPort( 'theZ' )
110 IMakeSpheretheRadius = MakeSphere.GetInPort( 'theRadius' )
111 IMakeSphereGate = MakeSphere.GetInPort( 'Gate' )
112 OMakeSpherereturn = MakeSphere.GetOutPort( 'return' )
113 OMakeSphereGate = MakeSphere.GetOutPort( 'Gate' )
115 MakeFuse_1 = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeFuse' )
116 MakeFuse_1.SetName( 'MakeFuse_1' )
117 MakeFuse_1.SetAuthor( '' )
118 MakeFuse_1.SetContainer( 'localhost/FactoryServer' )
119 MakeFuse_1.SetComment( 'MakeFuse from GEOM_Superv' )
120 MakeFuse_1.Coords( 2007 , 210 )
121 IMakeFuse_1theShape1 = MakeFuse_1.GetInPort( 'theShape1' )
122 IMakeFuse_1theShape2 = MakeFuse_1.GetInPort( 'theShape2' )
123 IMakeFuse_1Gate = MakeFuse_1.GetInPort( 'Gate' )
124 OMakeFuse_1return = MakeFuse_1.GetOutPort( 'return' )
125 OMakeFuse_1Gate = MakeFuse_1.GetOutPort( 'Gate' )
127 SetStudyID = aNewDataFlow_1_4.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'SetStudyID' )
128 SetStudyID.SetName( 'SetStudyID' )
129 SetStudyID.SetAuthor( '' )
130 SetStudyID.SetContainer( 'localhost/FactoryServer' )
131 SetStudyID.SetComment( 'SetStudyID from GEOM_Superv' )
132 SetStudyID.Coords( 7 , 269 )
133 ISetStudyIDtheStudyID = SetStudyID.GetInPort( 'theStudyID' )
134 ISetStudyIDGate = SetStudyID.GetInPort( 'Gate' )
135 OSetStudyIDGate = SetStudyID.GetOutPort( 'Gate' )
137 # Creation of Macro Nodes
138 aNewDataFlow_1_1_2 = DefaNewDataFlow_1_1_2()
139 Macro_aNewDataFlow_1 = aNewDataFlow_1_4.GraphMNode( aNewDataFlow_1_1_2 )
140 Macro_aNewDataFlow_1.SetCoupled( 'aNewDataFlow_1_1_2' )
141 Macro_aNewDataFlow_1.SetName( 'Macro_aNewDataFlow_1' )
142 Macro_aNewDataFlow_1.SetAuthor( '' )
143 Macro_aNewDataFlow_1.SetComment( 'Macro Node' )
144 Macro_aNewDataFlow_1.Coords( 718 , 263 )
145 IMacro_aNewDataFlow_1sum__a = Macro_aNewDataFlow_1.GetInPort( 'sum__a' )
146 IMacro_aNewDataFlow_1sum__b = Macro_aNewDataFlow_1.GetInPort( 'sum__b' )
147 IMacro_aNewDataFlow_1Gate = Macro_aNewDataFlow_1.GetInPort( 'Gate' )
148 OMacro_aNewDataFlow_1Mult__b = Macro_aNewDataFlow_1.GetOutPort( 'Mult__b' )
149 OMacro_aNewDataFlow_1Gate = Macro_aNewDataFlow_1.GetOutPort( 'Gate' )
152 LMacro_aNewDataFlow_1Mult__bTranslateDXDYDZtheDY = aNewDataFlow_1_4.Link( OMacro_aNewDataFlow_1Mult__b , ITranslateDXDYDZtheDY )
154 LTranslateDXDYDZreturnMakeFusetheShape1 = aNewDataFlow_1_4.Link( OTranslateDXDYDZreturn , IMakeFusetheShape1 )
156 LTranslateDXDYDZGateMakeCopy_1Gate = aNewDataFlow_1_4.Link( OTranslateDXDYDZGate , IMakeCopy_1Gate )
158 LMakeCopyreturnTranslateDXDYDZtheObject = aNewDataFlow_1_4.Link( OMakeCopyreturn , ITranslateDXDYDZtheObject )
160 LMakeCopyGateTranslateDXDYDZGate = aNewDataFlow_1_4.Link( OMakeCopyGate , ITranslateDXDYDZGate )
162 LMakeBoxreturnMakeCopytheOriginal = aNewDataFlow_1_4.Link( OMakeBoxreturn , IMakeCopytheOriginal )
164 LMakeBoxreturnMakeCopy_1theOriginal = aNewDataFlow_1_4.Link( OMakeBoxreturn , IMakeCopy_1theOriginal )
166 LMakeBoxGateMakeCopyGate = aNewDataFlow_1_4.Link( OMakeBoxGate , IMakeCopyGate )
168 LMakeCopy_1returnMakeFusetheShape2 = aNewDataFlow_1_4.Link( OMakeCopy_1return , IMakeFusetheShape2 )
170 LMakeCopy_1GateMakeFuseGate = aNewDataFlow_1_4.Link( OMakeCopy_1Gate , IMakeFuseGate )
172 LMakeFusereturnMakeFuse_1theShape1 = aNewDataFlow_1_4.Link( OMakeFusereturn , IMakeFuse_1theShape1 )
174 LMakeFuseGateMakeSphereGate = aNewDataFlow_1_4.Link( OMakeFuseGate , IMakeSphereGate )
176 LMakeSpherereturnMakeFuse_1theShape2 = aNewDataFlow_1_4.Link( OMakeSpherereturn , IMakeFuse_1theShape2 )
178 LMakeSphereGateMakeFuse_1Gate = aNewDataFlow_1_4.Link( OMakeSphereGate , IMakeFuse_1Gate )
180 LSetStudyIDGateMakeBoxGate = aNewDataFlow_1_4.Link( OSetStudyIDGate , IMakeBoxGate )
183 IMacro_aNewDataFlow_1sum__a.Input( 1 )
184 IMacro_aNewDataFlow_1sum__b.Input( 2 )
185 ITranslateDXDYDZtheDX.Input( 25 )
186 ITranslateDXDYDZtheDZ.Input( 25 )
187 IMakeBoxtheX1.Input( 0 )
188 IMakeBoxtheY1.Input( 0 )
189 IMakeBoxtheZ1.Input( 0 )
190 IMakeBoxtheX2.Input( 50 )
191 IMakeBoxtheY2.Input( 50 )
192 IMakeBoxtheZ2.Input( 50 )
193 IMakeSpheretheX.Input( 0 )
194 IMakeSpheretheY.Input( 0 )
195 IMakeSpheretheZ.Input( 0 )
196 IMakeSpheretheRadius.Input( 12 )
197 ISetStudyIDtheStudyID.Input( 12 )
199 # Output Ports of the graph
200 #OMakeFuse_1return = MakeFuse_1.GetOutPort( 'return' )
201 return aNewDataFlow_1_4
203 # Graph creation of aNewDataFlow_1_1_2
204 def DefaNewDataFlow_1_1_2() :
205 aNewDataFlow_1_1_2 = Graph( 'aNewDataFlow_1_1_2' )
206 aNewDataFlow_1_1_2.SetCoupled( 'Macro_aNewDataFlow_1' )
207 aNewDataFlow_1_1_2.SetName( 'aNewDataFlow_1_1_2' )
208 aNewDataFlow_1_1_2.SetAuthor( '' )
209 aNewDataFlow_1_1_2.SetComment( '' )
210 aNewDataFlow_1_1_2.Coords( 0 , 0 )
212 # Creation of Factory Nodes
214 # Creation of InLine Nodes
216 PyMult.append( 'def Mult(a): ' )
217 PyMult.append( ' b = a*3 ' )
218 PyMult.append( ' return b ' )
219 Mult = aNewDataFlow_1_1_2.INode( 'Mult' , PyMult )
220 Mult.SetName( 'Mult' )
222 Mult.SetComment( 'Compute Node' )
223 Mult.Coords( 382 , 78 )
224 IMulta = Mult.InPort( 'a' , 'double' )
225 IMultGate = Mult.GetInPort( 'Gate' )
226 OMultb = Mult.OutPort( 'b' , 'double' )
227 OMultGate = Mult.GetOutPort( 'Gate' )
230 Pysum.append( 'def sum(a, b): ' )
231 Pysum.append( ' return a+b' )
232 sum = aNewDataFlow_1_1_2.INode( 'sum' , Pysum )
235 sum.SetComment( 'Compute Node' )
236 sum.Coords( 47 , 87 )
237 Isuma = sum.InPort( 'a' , 'double' )
238 Isumb = sum.InPort( 'b' , 'double' )
239 IsumGate = sum.GetInPort( 'Gate' )
240 Osums = sum.OutPort( 's' , 'double' )
241 OsumGate = sum.GetOutPort( 'Gate' )
244 LsumsMulta = aNewDataFlow_1_1_2.Link( Osums , IMulta )
246 # Input Ports of the graph
247 #Isuma = sum.GetInPort( 'a' )
248 #Isumb = sum.GetInPort( 'b' )
250 # Output Ports of the graph
251 #OMultb = Mult.GetOutPort( 'b' )
252 return aNewDataFlow_1_1_2
255 aNewDataFlow_1_4 = DefaNewDataFlow_1_4()