2 # Generated python file of Graph aNewDataFlow_1_4_2_1_1_2_2_1_1
6 # Graph creation of aNewDataFlow_1_4_2_1_1_2_2_1_1
7 def DefaNewDataFlow_1_4_2_1_1_2_2_1_1() :
8 aNewDataFlow_1_4_2_1_1_2_2_1_1 = Graph( 'aNewDataFlow_1_4_2_1_1_2_2_1_1' )
9 aNewDataFlow_1_4_2_1_1_2_2_1_1.SetName( 'aNewDataFlow_1_4_2_1_1_2_2_1_1' )
10 aNewDataFlow_1_4_2_1_1_2_2_1_1.SetAuthor( '' )
11 aNewDataFlow_1_4_2_1_1_2_2_1_1.SetComment( '' )
12 aNewDataFlow_1_4_2_1_1_2_2_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_2_1_1_2_2_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_2_1_1_2_2_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_2_1_1_2_2_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_2_1_1_2_2_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( 389 , 136 )
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_2_1_1_2_2_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' )
95 PyMakeTranslation_1 = []
96 PyMakeTranslation_1.append( 'def MakeTranslation_1(shape1,x1,y1,z1): ' )
97 PyMakeTranslation_1.append( ' shape = MakeTranslation(shape1,x1,y1,z1) ' )
98 PyMakeTranslation_1.append( ' return shape ' )
99 MakeTranslation_1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeTranslation_1' , PyMakeTranslation_1 )
100 MakeTranslation_1.SetName( 'MakeTranslation_1' )
101 MakeTranslation_1.SetAuthor( '' )
102 MakeTranslation_1.SetComment( 'Compute Node' )
103 MakeTranslation_1.Coords( 596 , 3 )
104 IMakeTranslation_1shape1 = MakeTranslation_1.InPort( 'shape1' , 'objref' )
105 IMakeTranslation_1x1 = MakeTranslation_1.InPort( 'x1' , 'double' )
106 IMakeTranslation_1y1 = MakeTranslation_1.InPort( 'y1' , 'double' )
107 IMakeTranslation_1z1 = MakeTranslation_1.InPort( 'z1' , 'double' )
108 IMakeTranslation_1Gate = MakeTranslation_1.GetInPort( 'Gate' )
109 OMakeTranslation_1shape = MakeTranslation_1.OutPort( 'shape' , 'objref' )
110 OMakeTranslation_1Gate = MakeTranslation_1.GetOutPort( 'Gate' )
113 PyMakeFuse_1.append( 'def MakeFuse_1(shape1,shape2): ' )
114 PyMakeFuse_1.append( ' # fuse operation 3 ' )
115 PyMakeFuse_1.append( ' shape = MakeBoolean(shape1,shape2,3) ' )
116 PyMakeFuse_1.append( ' return shape ' )
117 MakeFuse_1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeFuse_1' , PyMakeFuse_1 )
118 MakeFuse_1.SetName( 'MakeFuse_1' )
119 MakeFuse_1.SetAuthor( '' )
120 MakeFuse_1.SetComment( 'Compute Node' )
121 MakeFuse_1.Coords( 823 , 116 )
122 IMakeFuse_1shape1 = MakeFuse_1.InPort( 'shape1' , 'objref' )
123 IMakeFuse_1shape2 = MakeFuse_1.InPort( 'shape2' , 'objref' )
124 IMakeFuse_1Gate = MakeFuse_1.GetInPort( 'Gate' )
125 OMakeFuse_1shape = MakeFuse_1.OutPort( 'shape' , 'objref' )
126 OMakeFuse_1Gate = MakeFuse_1.GetOutPort( 'Gate' )
129 PyMakeFuse_2.append( 'def MakeFuse_2(shape1,shape2): ' )
130 PyMakeFuse_2.append( ' # fuse operation 3 ' )
131 PyMakeFuse_2.append( ' shape = MakeBoolean(shape1,shape2,3) ' )
132 PyMakeFuse_2.append( ' from SALOME_NamingServicePy import SALOME_NamingServicePy_i ' )
133 PyMakeFuse_2.append( ' myNamingService = SALOME_NamingServicePy_i(orb) ' )
134 PyMakeFuse_2.append( ' aSession = myNamingService.Resolve('/Kernel/Session') ' )
135 PyMakeFuse_2.append( ' aStudyId = aSession.GetActiveStudyId() ' )
136 PyMakeFuse_2.append( ' myStudyManager = myNamingService.Resolve('/myStudyManager') ' )
137 PyMakeFuse_2.append( ' aStudy = myStudyManager.GetStudyByID(aStudyId) ' )
138 PyMakeFuse_2.append( ' aSObject = geom.AddInStudy(aStudy, shape, "shape", None) ' )
139 PyMakeFuse_2.append( ' return shape ' )
140 MakeFuse_2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeFuse_2' , PyMakeFuse_2 )
141 MakeFuse_2.SetName( 'MakeFuse_2' )
142 MakeFuse_2.SetAuthor( '' )
143 MakeFuse_2.SetComment( 'Compute Node' )
144 MakeFuse_2.Coords( 1049 , 295 )
145 IMakeFuse_2shape1 = MakeFuse_2.InPort( 'shape1' , 'objref' )
146 IMakeFuse_2shape2 = MakeFuse_2.InPort( 'shape2' , 'objref' )
147 IMakeFuse_2Gate = MakeFuse_2.GetInPort( 'Gate' )
148 OMakeFuse_2shape = MakeFuse_2.OutPort( 'shape' , 'objref' )
149 OMakeFuse_2Gate = MakeFuse_2.GetOutPort( 'Gate' )
152 LgagGateMakeBox1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OgagGate , IMakeBox1Gate )
154 LgagGateMakeSphere_1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OgagGate , IMakeSphere_1Gate )
155 LgagGateMakeSphere_1Gate.AddCoord( 1 , 164 , 470 )
156 LgagGateMakeSphere_1Gate.AddCoord( 2 , 164 , 265 )
158 LMakeBox1shapeMakeCopy_1shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeBox1shape , IMakeCopy_1shape1 )
160 LMakeBox1shapeMakeCopy_2shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeBox1shape , IMakeCopy_2shape1 )
161 LMakeBox1shapeMakeCopy_2shape1.AddCoord( 1 , 384 , 207 )
163 LMakeCopy_1shapeMakeTranslation_1shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeCopy_1shape , IMakeTranslation_1shape1 )
165 LMakeCopy_2shapeMakeFuse_1shape2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeCopy_2shape , IMakeFuse_1shape2 )
166 LMakeCopy_2shapeMakeFuse_1shape2.AddCoord( 1 , 674 , 207 )
168 LMakeSphere_1shapeMakeFuse_2shape2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeSphere_1shape , IMakeFuse_2shape2 )
170 LMakeTranslation_1shapeMakeFuse_1shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeTranslation_1shape , IMakeFuse_1shape1 )
172 LMakeFuse_1shapeMakeFuse_2shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeFuse_1shape , IMakeFuse_2shape1 )
173 LMakeFuse_1shapeMakeFuse_2shape1.AddCoord( 1 , 1017 , 366 )
174 LMakeFuse_1shapeMakeFuse_2shape1.AddCoord( 2 , 1017 , 187 )
177 IMakeBox1x1.Input( 0 )
178 IMakeBox1y1.Input( 0 )
179 IMakeBox1z1.Input( 0 )
180 IMakeBox1x2.Input( 50 )
181 IMakeBox1y2.Input( 50 )
182 IMakeBox1z2.Input( 50 )
183 IMakeSphere_1x1.Input( 0 )
184 IMakeSphere_1y1.Input( 0 )
185 IMakeSphere_1z1.Input( 0 )
186 IMakeSphere_1radius.Input( 12 )
187 IMakeTranslation_1x1.Input( 25 )
188 IMakeTranslation_1y1.Input( 25 )
189 IMakeTranslation_1z1.Input( 25 )
191 # Output Ports of the graph
192 #OMakeFuse_2shape = MakeFuse_2.GetOutPort( 'shape' )
193 return aNewDataFlow_1_4_2_1_1_2_2_1_1
196 aNewDataFlow_1_4_2_1_1_2_2_1_1 = DefaNewDataFlow_1_4_2_1_1_2_2_1_1()