2 # Generated python file of Graph aNewDataFlow_1_4_1_1_1_1
6 # Graph creation of aNewDataFlow_1_4_1_1_1_1
7 def DefaNewDataFlow_1_4_1_1_1_1() :
8 aNewDataFlow_1_4_1_1_1_1 = Graph( 'aNewDataFlow_1_4_1_1_1_1' )
9 aNewDataFlow_1_4_1_1_1_1.SetName( 'aNewDataFlow_1_4_1_1_1_1' )
10 aNewDataFlow_1_4_1_1_1_1.SetAuthor( '' )
11 aNewDataFlow_1_4_1_1_1_1.SetComment( '' )
12 aNewDataFlow_1_4_1_1_1_1.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 # Creation of InLine Nodes
18 Pygag.append( 'from batchmode_geompy import * ' )
19 Pygag.append( 'def gag(): ' )
20 Pygag.append( ' # This is a gag ' )
21 Pygag.append( ' return 1 ' )
22 gag = aNewDataFlow_1_4_1_1_1_1.INode( 'gag' , Pygag )
25 gag.SetComment( 'Compute Node' )
27 IgagGate = gag.GetInPort( 'Gate' )
28 OgagGate = gag.GetOutPort( 'Gate' )
31 PyMakeBox1.append( 'def MakeBox1(x1,y1,z1,x2,y2,z2): ' )
32 PyMakeBox1.append( ' aBox = MakeBox(x1,y1,z1,x2,y2,z2) ' )
33 PyMakeBox1.append( ' return aBox ' )
34 MakeBox1 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeBox1' , PyMakeBox1 )
35 MakeBox1.SetName( 'MakeBox1' )
36 MakeBox1.SetAuthor( '' )
37 MakeBox1.SetComment( 'Compute Node' )
38 MakeBox1.Coords( 194 , 3 )
39 IMakeBox1x1 = MakeBox1.InPort( 'x1' , 'double' )
40 IMakeBox1y1 = MakeBox1.InPort( 'y1' , 'double' )
41 IMakeBox1z1 = MakeBox1.InPort( 'z1' , 'double' )
42 IMakeBox1x2 = MakeBox1.InPort( 'x2' , 'double' )
43 IMakeBox1y2 = MakeBox1.InPort( 'y2' , 'double' )
44 IMakeBox1z2 = MakeBox1.InPort( 'z2' , 'double' )
45 IMakeBox1Gate = MakeBox1.GetInPort( 'Gate' )
46 OMakeBox1shape = MakeBox1.OutPort( 'shape' , 'objref' )
47 OMakeBox1Gate = MakeBox1.GetOutPort( 'Gate' )
50 PyMakeCopy_1.append( 'def MakeCopy_1(shape1): ' )
51 PyMakeCopy_1.append( ' shape=MakeCopy(shape1) ' )
52 PyMakeCopy_1.append( ' return shape ' )
53 MakeCopy_1 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeCopy_1' , PyMakeCopy_1 )
54 MakeCopy_1.SetName( 'MakeCopy_1' )
55 MakeCopy_1.SetAuthor( '' )
56 MakeCopy_1.SetComment( 'Compute Node' )
57 MakeCopy_1.Coords( 389 , 3 )
58 IMakeCopy_1shape1 = MakeCopy_1.InPort( 'shape1' , 'objref' )
59 IMakeCopy_1Gate = MakeCopy_1.GetInPort( 'Gate' )
60 OMakeCopy_1shape = MakeCopy_1.OutPort( 'shape' , 'objref' )
61 OMakeCopy_1Gate = MakeCopy_1.GetOutPort( 'Gate' )
64 PyMakeCopy_2.append( 'def MakeCopy_2(shape1): ' )
65 PyMakeCopy_2.append( ' shape=MakeCopy(shape1) ' )
66 PyMakeCopy_2.append( ' return shape ' )
67 MakeCopy_2 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeCopy_2' , PyMakeCopy_2 )
68 MakeCopy_2.SetName( 'MakeCopy_2' )
69 MakeCopy_2.SetAuthor( '' )
70 MakeCopy_2.SetComment( 'Compute Node' )
71 MakeCopy_2.Coords( 391 , 264 )
72 IMakeCopy_2shape1 = MakeCopy_2.InPort( 'shape1' , 'objref' )
73 IMakeCopy_2Gate = MakeCopy_2.GetInPort( 'Gate' )
74 OMakeCopy_2shape = MakeCopy_2.OutPort( 'shape' , 'objref' )
75 OMakeCopy_2Gate = MakeCopy_2.GetOutPort( 'Gate' )
78 PyMakeSphere_1.append( 'def MakeSphere_1(x1,y1,z1,radius): ' )
79 PyMakeSphere_1.append( ' apoint=MakeVertex(x1,y1,z1) ' )
80 PyMakeSphere_1.append( ' shape=MakeSpherePntR(apoint,radius) ' )
81 PyMakeSphere_1.append( ' return shape ' )
82 MakeSphere_1 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeSphere_1' , PyMakeSphere_1 )
83 MakeSphere_1.SetName( 'MakeSphere_1' )
84 MakeSphere_1.SetAuthor( '' )
85 MakeSphere_1.SetComment( 'Compute Node' )
86 MakeSphere_1.Coords( 203 , 315 )
87 IMakeSphere_1x1 = MakeSphere_1.InPort( 'x1' , 'double' )
88 IMakeSphere_1y1 = MakeSphere_1.InPort( 'y1' , 'double' )
89 IMakeSphere_1z1 = MakeSphere_1.InPort( 'z1' , 'double' )
90 IMakeSphere_1radius = MakeSphere_1.InPort( 'radius' , 'double' )
91 IMakeSphere_1Gate = MakeSphere_1.GetInPort( 'Gate' )
92 OMakeSphere_1shape = MakeSphere_1.OutPort( 'shape' , 'objref' )
93 OMakeSphere_1Gate = MakeSphere_1.GetOutPort( 'Gate' )
96 PyMakeFuse_1.append( 'def MakeFuse_1(shape1,shape2): ' )
97 PyMakeFuse_1.append( ' # fuse operation 3 ' )
98 PyMakeFuse_1.append( ' shape = MakeBoolean(shape1,shape2,3) ' )
99 PyMakeFuse_1.append( ' return shape ' )
100 MakeFuse_1 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeFuse_1' , PyMakeFuse_1 )
101 MakeFuse_1.SetName( 'MakeFuse_1' )
102 MakeFuse_1.SetAuthor( '' )
103 MakeFuse_1.SetComment( 'Compute Node' )
104 MakeFuse_1.Coords( 823 , 116 )
105 IMakeFuse_1shape1 = MakeFuse_1.InPort( 'shape1' , 'objref' )
106 IMakeFuse_1shape2 = MakeFuse_1.InPort( 'shape2' , 'objref' )
107 IMakeFuse_1Gate = MakeFuse_1.GetInPort( 'Gate' )
108 OMakeFuse_1shape = MakeFuse_1.OutPort( 'shape' , 'objref' )
109 OMakeFuse_1Gate = MakeFuse_1.GetOutPort( 'Gate' )
112 PyMakeFuse_2.append( 'def MakeFuse_2(shape1,shape2): ' )
113 PyMakeFuse_2.append( ' # fuse operation 3 ' )
114 PyMakeFuse_2.append( ' shape = MakeBoolean(shape1,shape2,3) ' )
115 PyMakeFuse_2.append( ' from SALOME_NamingServicePy import SALOME_NamingServicePy_i ' )
116 PyMakeFuse_2.append( ' myNamingService = SALOME_NamingServicePy_i(orb) ' )
117 PyMakeFuse_2.append( ' aSession = myNamingService.Resolve('/Kernel/Session') ' )
118 PyMakeFuse_2.append( ' aStudyId = aSession.GetActiveStudyId() ' )
119 PyMakeFuse_2.append( ' myStudyManager = myNamingService.Resolve('/myStudyManager') ' )
120 PyMakeFuse_2.append( ' aStudy = myStudyManager.GetStudyByID(aStudyId) ' )
121 PyMakeFuse_2.append( ' aSObject = geom.AddInStudy(aStudy, shape, "shape", None) ' )
122 PyMakeFuse_2.append( ' return shape ' )
123 MakeFuse_2 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeFuse_2' , PyMakeFuse_2 )
124 MakeFuse_2.SetName( 'MakeFuse_2' )
125 MakeFuse_2.SetAuthor( '' )
126 MakeFuse_2.SetComment( 'Compute Node' )
127 MakeFuse_2.Coords( 1049 , 295 )
128 IMakeFuse_2shape1 = MakeFuse_2.InPort( 'shape1' , 'objref' )
129 IMakeFuse_2shape2 = MakeFuse_2.InPort( 'shape2' , 'objref' )
130 IMakeFuse_2Gate = MakeFuse_2.GetInPort( 'Gate' )
131 OMakeFuse_2shape = MakeFuse_2.OutPort( 'shape' , 'objref' )
132 OMakeFuse_2Gate = MakeFuse_2.GetOutPort( 'Gate' )
134 PyMakeTranslation_1 = []
135 PyMakeTranslation_1.append( 'def MakeTranslation_1(shape1,x1,y1,z1): ' )
136 PyMakeTranslation_1.append( ' shape = MakeTranslation(shape1,x1,y1,z1) ' )
137 PyMakeTranslation_1.append( ' return shape' )
138 MakeTranslation_1 = aNewDataFlow_1_4_1_1_1_1.INode( 'MakeTranslation_1' , PyMakeTranslation_1 )
139 MakeTranslation_1.SetName( 'MakeTranslation_1' )
140 MakeTranslation_1.SetAuthor( '' )
141 MakeTranslation_1.SetComment( 'Compute Node' )
142 MakeTranslation_1.Coords( 621 , 12 )
143 IMakeTranslation_1shape1 = MakeTranslation_1.InPort( 'shape1' , 'objref' )
144 IMakeTranslation_1x1 = MakeTranslation_1.InPort( 'x1' , 'double' )
145 IMakeTranslation_1y1 = MakeTranslation_1.InPort( 'y1' , 'double' )
146 IMakeTranslation_1z1 = MakeTranslation_1.InPort( 'z1' , 'double' )
147 IMakeTranslation_1Gate = MakeTranslation_1.GetInPort( 'Gate' )
148 OMakeTranslation_1shape = MakeTranslation_1.OutPort( 'shape' , 'objref' )
149 OMakeTranslation_1Gate = MakeTranslation_1.GetOutPort( 'Gate' )
151 # Creation of Macro Nodes
152 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1 = DefaNewDataFlow_1_5_1_1_3_3_1_1_1_3_1()
153 Macro_aNewDataFlow_1_5_1_1 = aNewDataFlow_1_4_1_1_1_1.GraphMNode( aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1 )
154 Macro_aNewDataFlow_1_5_1_1.SetCoupled( 'aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1' )
155 Macro_aNewDataFlow_1_5_1_1.SetName( 'Macro_aNewDataFlow_1_5_1_1' )
156 Macro_aNewDataFlow_1_5_1_1.SetAuthor( '' )
157 Macro_aNewDataFlow_1_5_1_1.SetComment( 'Macro Node' )
158 Macro_aNewDataFlow_1_5_1_1.Coords( 391 , 121 )
159 IMacro_aNewDataFlow_1_5_1_1sum__a = Macro_aNewDataFlow_1_5_1_1.GetInPort( 'sum__a' )
160 IMacro_aNewDataFlow_1_5_1_1sum__b = Macro_aNewDataFlow_1_5_1_1.GetInPort( 'sum__b' )
161 IMacro_aNewDataFlow_1_5_1_1Gate = Macro_aNewDataFlow_1_5_1_1.GetInPort( 'Gate' )
162 OMacro_aNewDataFlow_1_5_1_1Mult__b = Macro_aNewDataFlow_1_5_1_1.GetOutPort( 'Mult__b' )
163 OMacro_aNewDataFlow_1_5_1_1Gate = Macro_aNewDataFlow_1_5_1_1.GetOutPort( 'Gate' )
166 LgagGateMakeBox1Gate = aNewDataFlow_1_4_1_1_1_1.Link( OgagGate , IMakeBox1Gate )
168 LgagGateMakeSphere_1Gate = aNewDataFlow_1_4_1_1_1_1.Link( OgagGate , IMakeSphere_1Gate )
169 LgagGateMakeSphere_1Gate.AddCoord( 1 , 175 , 470 )
170 LgagGateMakeSphere_1Gate.AddCoord( 2 , 175 , 198 )
172 LMakeBox1shapeMakeCopy_1shape1 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeBox1shape , IMakeCopy_1shape1 )
174 LMakeBox1shapeMakeCopy_2shape1 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeBox1shape , IMakeCopy_2shape1 )
175 LMakeBox1shapeMakeCopy_2shape1.AddCoord( 1 , 373 , 211 )
177 LMakeCopy_1shapeMakeTranslation_1shape1 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeCopy_1shape , IMakeTranslation_1shape1 )
179 LMakeCopy_2shapeMakeFuse_1shape2 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeCopy_2shape , IMakeFuse_1shape2 )
180 LMakeCopy_2shapeMakeFuse_1shape2.AddCoord( 1 , 674 , 207 )
182 LMakeSphere_1shapeMakeFuse_2shape2 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeSphere_1shape , IMakeFuse_2shape2 )
184 LMakeFuse_1shapeMakeFuse_2shape1 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeFuse_1shape , IMakeFuse_2shape1 )
185 LMakeFuse_1shapeMakeFuse_2shape1.AddCoord( 1 , 1017 , 366 )
186 LMakeFuse_1shapeMakeFuse_2shape1.AddCoord( 2 , 1017 , 187 )
188 LMacro_aNewDataFlow_1_5_1_1Mult__bMakeTranslation_1y1 = aNewDataFlow_1_4_1_1_1_1.Link( OMacro_aNewDataFlow_1_5_1_1Mult__b , IMakeTranslation_1y1 )
190 LMakeTranslation_1shapeMakeFuse_1shape1 = aNewDataFlow_1_4_1_1_1_1.Link( OMakeTranslation_1shape , IMakeFuse_1shape1 )
193 IMakeBox1x1.Input( 0 )
194 IMakeBox1y1.Input( 0 )
195 IMakeBox1z1.Input( 0 )
196 IMakeBox1x2.Input( 50 )
197 IMakeBox1y2.Input( 50 )
198 IMakeBox1z2.Input( 50 )
199 IMakeSphere_1x1.Input( 0 )
200 IMakeSphere_1y1.Input( 0 )
201 IMakeSphere_1z1.Input( 0 )
202 IMakeSphere_1radius.Input( 12 )
203 IMacro_aNewDataFlow_1_5_1_1sum__a.Input( 1 )
204 IMacro_aNewDataFlow_1_5_1_1sum__b.Input( 2 )
205 IMakeTranslation_1x1.Input( 25 )
206 IMakeTranslation_1z1.Input( 25 )
208 # Output Ports of the graph
209 #OMakeFuse_2shape = MakeFuse_2.GetOutPort( 'shape' )
210 return aNewDataFlow_1_4_1_1_1_1
212 # Graph creation of aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1
213 def DefaNewDataFlow_1_5_1_1_3_3_1_1_1_3_1() :
214 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1 = Graph( 'aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1' )
215 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.SetCoupled( 'Macro_aNewDataFlow_1_5_1_1' )
216 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.SetName( 'aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1' )
217 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.SetAuthor( '' )
218 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.SetComment( '' )
219 aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.Coords( 0 , 0 )
221 # Creation of Factory Nodes
223 # Creation of InLine Nodes
225 Pysum.append( 'def sum(a, b): ' )
226 Pysum.append( ' return a+b ' )
227 sum = aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.INode( 'sum' , Pysum )
230 sum.SetComment( 'Compute Node' )
231 sum.Coords( 52 , 80 )
232 Isuma = sum.InPort( 'a' , 'double' )
233 Isumb = sum.InPort( 'b' , 'double' )
234 IsumGate = sum.GetInPort( 'Gate' )
235 Osums = sum.OutPort( 's' , 'double' )
236 OsumGate = sum.GetOutPort( 'Gate' )
239 PyMult.append( 'def Mult(a): ' )
240 PyMult.append( ' b = a*3 ' )
241 PyMult.append( ' return b ' )
242 Mult = aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.INode( 'Mult' , PyMult )
243 Mult.SetName( 'Mult' )
245 Mult.SetComment( 'Compute Node' )
246 Mult.Coords( 298 , 72 )
247 IMulta = Mult.InPort( 'a' , 'double' )
248 IMultGate = Mult.GetInPort( 'Gate' )
249 OMultb = Mult.OutPort( 'b' , 'double' )
250 OMultGate = Mult.GetOutPort( 'Gate' )
253 LsumsMulta = aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1.Link( Osums , IMulta )
255 # Input Ports of the graph
256 #Isuma = sum.GetInPort( 'a' )
257 #Isumb = sum.GetInPort( 'b' )
259 # Output Ports of the graph
260 #OMultb = Mult.GetOutPort( 'b' )
261 return aNewDataFlow_1_5_1_1_3_3_1_1_1_3_1
264 aNewDataFlow_1_4_1_1_1_1 = DefaNewDataFlow_1_4_1_1_1_1()