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 aNewDataFlow_1_4_2_1_1_2_2_1_1
26 # Graph creation of aNewDataFlow_1_4_2_1_1_2_2_1_1
27 def DefaNewDataFlow_1_4_2_1_1_2_2_1_1() :
28 aNewDataFlow_1_4_2_1_1_2_2_1_1 = Graph( 'aNewDataFlow_1_4_2_1_1_2_2_1_1' )
29 aNewDataFlow_1_4_2_1_1_2_2_1_1.SetName( 'aNewDataFlow_1_4_2_1_1_2_2_1_1' )
30 aNewDataFlow_1_4_2_1_1_2_2_1_1.SetAuthor( '' )
31 aNewDataFlow_1_4_2_1_1_2_2_1_1.SetComment( '' )
32 aNewDataFlow_1_4_2_1_1_2_2_1_1.Coords( 0 , 0 )
34 # Creation of Factory Nodes
36 # Creation of InLine Nodes
38 Pygag.append( 'from batchmode_geompy import * ' )
39 Pygag.append( 'def gag(): ' )
40 Pygag.append( ' # This is a gag ' )
41 Pygag.append( ' return 1 ' )
42 gag = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'gag' , Pygag )
45 gag.SetComment( 'Compute Node' )
47 IgagGate = gag.GetInPort( 'Gate' )
48 OgagGate = gag.GetOutPort( 'Gate' )
51 PyMakeBox1.append( 'def MakeBox1(x1,y1,z1,x2,y2,z2): ' )
52 PyMakeBox1.append( ' aBox = MakeBox(x1,y1,z1,x2,y2,z2) ' )
53 PyMakeBox1.append( ' return aBox ' )
54 MakeBox1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeBox1' , PyMakeBox1 )
55 MakeBox1.SetName( 'MakeBox1' )
56 MakeBox1.SetAuthor( '' )
57 MakeBox1.SetComment( 'Compute Node' )
58 MakeBox1.Coords( 194 , 3 )
59 IMakeBox1x1 = MakeBox1.InPort( 'x1' , 'double' )
60 IMakeBox1y1 = MakeBox1.InPort( 'y1' , 'double' )
61 IMakeBox1z1 = MakeBox1.InPort( 'z1' , 'double' )
62 IMakeBox1x2 = MakeBox1.InPort( 'x2' , 'double' )
63 IMakeBox1y2 = MakeBox1.InPort( 'y2' , 'double' )
64 IMakeBox1z2 = MakeBox1.InPort( 'z2' , 'double' )
65 IMakeBox1Gate = MakeBox1.GetInPort( 'Gate' )
66 OMakeBox1shape = MakeBox1.OutPort( 'shape' , 'objref' )
67 OMakeBox1Gate = MakeBox1.GetOutPort( 'Gate' )
70 PyMakeCopy_1.append( 'def MakeCopy_1(shape1): ' )
71 PyMakeCopy_1.append( ' shape=MakeCopy(shape1) ' )
72 PyMakeCopy_1.append( ' return shape ' )
73 MakeCopy_1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeCopy_1' , PyMakeCopy_1 )
74 MakeCopy_1.SetName( 'MakeCopy_1' )
75 MakeCopy_1.SetAuthor( '' )
76 MakeCopy_1.SetComment( 'Compute Node' )
77 MakeCopy_1.Coords( 389 , 3 )
78 IMakeCopy_1shape1 = MakeCopy_1.InPort( 'shape1' , 'objref' )
79 IMakeCopy_1Gate = MakeCopy_1.GetInPort( 'Gate' )
80 OMakeCopy_1shape = MakeCopy_1.OutPort( 'shape' , 'objref' )
81 OMakeCopy_1Gate = MakeCopy_1.GetOutPort( 'Gate' )
84 PyMakeCopy_2.append( 'def MakeCopy_2(shape1): ' )
85 PyMakeCopy_2.append( ' shape=MakeCopy(shape1) ' )
86 PyMakeCopy_2.append( ' return shape ' )
87 MakeCopy_2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeCopy_2' , PyMakeCopy_2 )
88 MakeCopy_2.SetName( 'MakeCopy_2' )
89 MakeCopy_2.SetAuthor( '' )
90 MakeCopy_2.SetComment( 'Compute Node' )
91 MakeCopy_2.Coords( 389 , 136 )
92 IMakeCopy_2shape1 = MakeCopy_2.InPort( 'shape1' , 'objref' )
93 IMakeCopy_2Gate = MakeCopy_2.GetInPort( 'Gate' )
94 OMakeCopy_2shape = MakeCopy_2.OutPort( 'shape' , 'objref' )
95 OMakeCopy_2Gate = MakeCopy_2.GetOutPort( 'Gate' )
98 PyMakeSphere_1.append( 'def MakeSphere_1(x1,y1,z1,radius): ' )
99 PyMakeSphere_1.append( ' apoint=MakeVertex(x1,y1,z1) ' )
100 PyMakeSphere_1.append( ' shape=MakeSpherePntR(apoint,radius) ' )
101 PyMakeSphere_1.append( ' return shape ' )
102 MakeSphere_1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeSphere_1' , PyMakeSphere_1 )
103 MakeSphere_1.SetName( 'MakeSphere_1' )
104 MakeSphere_1.SetAuthor( '' )
105 MakeSphere_1.SetComment( 'Compute Node' )
106 MakeSphere_1.Coords( 609 , 313 )
107 IMakeSphere_1x1 = MakeSphere_1.InPort( 'x1' , 'double' )
108 IMakeSphere_1y1 = MakeSphere_1.InPort( 'y1' , 'double' )
109 IMakeSphere_1z1 = MakeSphere_1.InPort( 'z1' , 'double' )
110 IMakeSphere_1radius = MakeSphere_1.InPort( 'radius' , 'double' )
111 IMakeSphere_1Gate = MakeSphere_1.GetInPort( 'Gate' )
112 OMakeSphere_1shape = MakeSphere_1.OutPort( 'shape' , 'objref' )
113 OMakeSphere_1Gate = MakeSphere_1.GetOutPort( 'Gate' )
115 PyMakeTranslation_1 = []
116 PyMakeTranslation_1.append( 'def MakeTranslation_1(shape1,x1,y1,z1): ' )
117 PyMakeTranslation_1.append( ' shape = MakeTranslation(shape1,x1,y1,z1) ' )
118 PyMakeTranslation_1.append( ' return shape ' )
119 MakeTranslation_1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeTranslation_1' , PyMakeTranslation_1 )
120 MakeTranslation_1.SetName( 'MakeTranslation_1' )
121 MakeTranslation_1.SetAuthor( '' )
122 MakeTranslation_1.SetComment( 'Compute Node' )
123 MakeTranslation_1.Coords( 596 , 3 )
124 IMakeTranslation_1shape1 = MakeTranslation_1.InPort( 'shape1' , 'objref' )
125 IMakeTranslation_1x1 = MakeTranslation_1.InPort( 'x1' , 'double' )
126 IMakeTranslation_1y1 = MakeTranslation_1.InPort( 'y1' , 'double' )
127 IMakeTranslation_1z1 = MakeTranslation_1.InPort( 'z1' , 'double' )
128 IMakeTranslation_1Gate = MakeTranslation_1.GetInPort( 'Gate' )
129 OMakeTranslation_1shape = MakeTranslation_1.OutPort( 'shape' , 'objref' )
130 OMakeTranslation_1Gate = MakeTranslation_1.GetOutPort( 'Gate' )
133 PyMakeFuse_1.append( 'def MakeFuse_1(shape1,shape2): ' )
134 PyMakeFuse_1.append( ' # fuse operation 3 ' )
135 PyMakeFuse_1.append( ' shape = MakeBoolean(shape1,shape2,3) ' )
136 PyMakeFuse_1.append( ' return shape ' )
137 MakeFuse_1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeFuse_1' , PyMakeFuse_1 )
138 MakeFuse_1.SetName( 'MakeFuse_1' )
139 MakeFuse_1.SetAuthor( '' )
140 MakeFuse_1.SetComment( 'Compute Node' )
141 MakeFuse_1.Coords( 823 , 116 )
142 IMakeFuse_1shape1 = MakeFuse_1.InPort( 'shape1' , 'objref' )
143 IMakeFuse_1shape2 = MakeFuse_1.InPort( 'shape2' , 'objref' )
144 IMakeFuse_1Gate = MakeFuse_1.GetInPort( 'Gate' )
145 OMakeFuse_1shape = MakeFuse_1.OutPort( 'shape' , 'objref' )
146 OMakeFuse_1Gate = MakeFuse_1.GetOutPort( 'Gate' )
149 PyMakeFuse_2.append( 'def MakeFuse_2(shape1,shape2): ' )
150 PyMakeFuse_2.append( ' # fuse operation 3 ' )
151 PyMakeFuse_2.append( ' shape = MakeBoolean(shape1,shape2,3) ' )
152 PyMakeFuse_2.append( ' from SALOME_NamingServicePy import SALOME_NamingServicePy_i ' )
153 PyMakeFuse_2.append( ' myNamingService = SALOME_NamingServicePy_i(orb) ' )
154 PyMakeFuse_2.append( ' aSession = myNamingService.Resolve('/Kernel/Session') ' )
155 PyMakeFuse_2.append( ' aStudyId = aSession.GetActiveStudyId() ' )
156 PyMakeFuse_2.append( ' myStudyManager = myNamingService.Resolve('/myStudyManager') ' )
157 PyMakeFuse_2.append( ' aStudy = myStudyManager.GetStudyByID(aStudyId) ' )
158 PyMakeFuse_2.append( ' aSObject = geom.AddInStudy(aStudy, shape, "shape", None) ' )
159 PyMakeFuse_2.append( ' return shape ' )
160 MakeFuse_2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.INode( 'MakeFuse_2' , PyMakeFuse_2 )
161 MakeFuse_2.SetName( 'MakeFuse_2' )
162 MakeFuse_2.SetAuthor( '' )
163 MakeFuse_2.SetComment( 'Compute Node' )
164 MakeFuse_2.Coords( 1049 , 295 )
165 IMakeFuse_2shape1 = MakeFuse_2.InPort( 'shape1' , 'objref' )
166 IMakeFuse_2shape2 = MakeFuse_2.InPort( 'shape2' , 'objref' )
167 IMakeFuse_2Gate = MakeFuse_2.GetInPort( 'Gate' )
168 OMakeFuse_2shape = MakeFuse_2.OutPort( 'shape' , 'objref' )
169 OMakeFuse_2Gate = MakeFuse_2.GetOutPort( 'Gate' )
172 LgagGateMakeBox1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OgagGate , IMakeBox1Gate )
174 LMakeBox1shapeMakeCopy_1shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeBox1shape , IMakeCopy_1shape1 )
176 LMakeBox1shapeMakeCopy_2shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeBox1shape , IMakeCopy_2shape1 )
177 LMakeBox1shapeMakeCopy_2shape1.AddCoord( 1 , 384 , 207 )
179 LMakeBox1GateMakeCopy_1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeBox1Gate , IMakeCopy_1Gate )
181 LMakeCopy_1shapeMakeTranslation_1shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeCopy_1shape , IMakeTranslation_1shape1 )
183 LMakeCopy_1GateMakeCopy_2Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeCopy_1Gate , IMakeCopy_2Gate )
184 LMakeCopy_1GateMakeCopy_2Gate.AddCoord( 1 , 366 , 231 )
185 LMakeCopy_1GateMakeCopy_2Gate.AddCoord( 2 , 570 , 98 )
187 LMakeCopy_2shapeMakeFuse_1shape2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeCopy_2shape , IMakeFuse_1shape2 )
188 LMakeCopy_2shapeMakeFuse_1shape2.AddCoord( 1 , 674 , 207 )
190 LMakeCopy_2GateMakeSphere_1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeCopy_2Gate , IMakeSphere_1Gate )
191 LMakeCopy_2GateMakeSphere_1Gate.AddCoord( 1 , 554 , 468 )
193 LMakeSphere_1shapeMakeFuse_2shape2 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeSphere_1shape , IMakeFuse_2shape2 )
195 LMakeSphere_1GateMakeTranslation_1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeSphere_1Gate , IMakeTranslation_1Gate )
196 LMakeSphere_1GateMakeTranslation_1Gate.AddCoord( 1 , 573 , 158 )
197 LMakeSphere_1GateMakeTranslation_1Gate.AddCoord( 2 , 796 , 468 )
199 LMakeTranslation_1shapeMakeFuse_1shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeTranslation_1shape , IMakeFuse_1shape1 )
201 LMakeTranslation_1GateMakeFuse_1Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeTranslation_1Gate , IMakeFuse_1Gate )
203 LMakeFuse_1shapeMakeFuse_2shape1 = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeFuse_1shape , IMakeFuse_2shape1 )
204 LMakeFuse_1shapeMakeFuse_2shape1.AddCoord( 1 , 1017 , 366 )
205 LMakeFuse_1shapeMakeFuse_2shape1.AddCoord( 2 , 1017 , 187 )
207 LMakeFuse_1GateMakeFuse_2Gate = aNewDataFlow_1_4_2_1_1_2_2_1_1.Link( OMakeFuse_1Gate , IMakeFuse_2Gate )
208 LMakeFuse_1GateMakeFuse_2Gate.AddCoord( 1 , 987 , 410 )
211 IMakeBox1x1.Input( 0 )
212 IMakeBox1y1.Input( 0 )
213 IMakeBox1z1.Input( 0 )
214 IMakeBox1x2.Input( 50 )
215 IMakeBox1y2.Input( 50 )
216 IMakeBox1z2.Input( 50 )
217 IMakeSphere_1x1.Input( 0 )
218 IMakeSphere_1y1.Input( 0 )
219 IMakeSphere_1z1.Input( 0 )
220 IMakeSphere_1radius.Input( 12 )
221 IMakeTranslation_1x1.Input( 25 )
222 IMakeTranslation_1y1.Input( 25 )
223 IMakeTranslation_1z1.Input( 25 )
225 # Output Ports of the graph
226 #OMakeFuse_2shape = MakeFuse_2.GetOutPort( 'shape' )
227 return aNewDataFlow_1_4_2_1_1_2_2_1_1
230 aNewDataFlow_1_4_2_1_1_2_2_1_1 = DefaNewDataFlow_1_4_2_1_1_2_2_1_1()