Salome HOME
a9feb7c0e30fdae5f47a0c8b6969887aeb403919
[samples/datafiles.git] / Superv / Python / GeomGraph.py
1 # Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
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.
10 #
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.
15 #
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
19 #
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22
23 # Generated python file of Graph GeomGraph
24 #
25 from SuperV import *
26
27 # Graph creation of GeomGraph
28 def DefGeomGraph() :
29     GeomGraph = Graph( 'GeomGraph' )
30     GeomGraph.SetName( 'GeomGraph' )
31     GeomGraph.SetAuthor( '' )
32     GeomGraph.SetComment( '' )
33     GeomGraph.Coords( 0 , 0 )
34     
35     # Creation of Factory Nodes
36     
37     SetStudyID = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'SetStudyID' )
38     SetStudyID.SetName( 'SetStudyID' )
39     SetStudyID.SetAuthor( '' )
40     SetStudyID.SetContainer( 'localhost/FactoryServer' )
41     SetStudyID.SetComment( 'SetStudyID from GEOM_Superv' )
42     SetStudyID.Coords( 14 , 241 )
43     ISetStudyIDtheStudyID = SetStudyID.GetInPort( 'theStudyID' )
44     ISetStudyIDGate = SetStudyID.GetInPort( 'Gate' )
45     OSetStudyIDGate = SetStudyID.GetOutPort( 'Gate' )
46     
47     MakeBox = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeBox' )
48     MakeBox.SetName( 'MakeBox' )
49     MakeBox.SetAuthor( '' )
50     MakeBox.SetContainer( 'localhost/FactoryServer' )
51     MakeBox.SetComment( 'MakeBox from GEOM_Superv' )
52     MakeBox.Coords( 198 , 46 )
53     IMakeBoxtheX1 = MakeBox.GetInPort( 'theX1' )
54     IMakeBoxtheY1 = MakeBox.GetInPort( 'theY1' )
55     IMakeBoxtheZ1 = MakeBox.GetInPort( 'theZ1' )
56     IMakeBoxtheX2 = MakeBox.GetInPort( 'theX2' )
57     IMakeBoxtheY2 = MakeBox.GetInPort( 'theY2' )
58     IMakeBoxtheZ2 = MakeBox.GetInPort( 'theZ2' )
59     IMakeBoxGate = MakeBox.GetInPort( 'Gate' )
60     OMakeBoxreturn = MakeBox.GetOutPort( 'return' )
61     OMakeBoxGate = MakeBox.GetOutPort( 'Gate' )
62     
63     MakeCopy = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeCopy' )
64     MakeCopy.SetName( 'MakeCopy' )
65     MakeCopy.SetAuthor( '' )
66     MakeCopy.SetContainer( 'localhost/FactoryServer' )
67     MakeCopy.SetComment( 'MakeCopy from GEOM_Superv' )
68     MakeCopy.Coords( 383 , 46 )
69     IMakeCopytheOriginal = MakeCopy.GetInPort( 'theOriginal' )
70     IMakeCopyGate = MakeCopy.GetInPort( 'Gate' )
71     OMakeCopyreturn = MakeCopy.GetOutPort( 'return' )
72     OMakeCopyGate = MakeCopy.GetOutPort( 'Gate' )
73     
74     TranslateDXDYDZ = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'TranslateDXDYDZ' )
75     TranslateDXDYDZ.SetName( 'TranslateDXDYDZ' )
76     TranslateDXDYDZ.SetAuthor( '' )
77     TranslateDXDYDZ.SetContainer( 'localhost/FactoryServer' )
78     TranslateDXDYDZ.SetComment( 'TranslateDXDYDZ from GEOM_Superv' )
79     TranslateDXDYDZ.Coords( 579 , 46 )
80     ITranslateDXDYDZtheObject = TranslateDXDYDZ.GetInPort( 'theObject' )
81     ITranslateDXDYDZtheDX = TranslateDXDYDZ.GetInPort( 'theDX' )
82     ITranslateDXDYDZtheDY = TranslateDXDYDZ.GetInPort( 'theDY' )
83     ITranslateDXDYDZtheDZ = TranslateDXDYDZ.GetInPort( 'theDZ' )
84     ITranslateDXDYDZGate = TranslateDXDYDZ.GetInPort( 'Gate' )
85     OTranslateDXDYDZreturn = TranslateDXDYDZ.GetOutPort( 'return' )
86     OTranslateDXDYDZGate = TranslateDXDYDZ.GetOutPort( 'Gate' )
87     
88     MakeCopy_1 = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeCopy' )
89     MakeCopy_1.SetName( 'MakeCopy_1' )
90     MakeCopy_1.SetAuthor( '' )
91     MakeCopy_1.SetContainer( 'localhost/FactoryServer' )
92     MakeCopy_1.SetComment( 'MakeCopy from GEOM_Superv' )
93     MakeCopy_1.Coords( 384 , 168 )
94     IMakeCopy_1theOriginal = MakeCopy_1.GetInPort( 'theOriginal' )
95     IMakeCopy_1Gate = MakeCopy_1.GetInPort( 'Gate' )
96     OMakeCopy_1return = MakeCopy_1.GetOutPort( 'return' )
97     OMakeCopy_1Gate = MakeCopy_1.GetOutPort( 'Gate' )
98     
99     MakeSphere_1 = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeSphere' )
100     MakeSphere_1.SetName( 'MakeSphere_1' )
101     MakeSphere_1.SetAuthor( '' )
102     MakeSphere_1.SetContainer( 'localhost/FactoryServer' )
103     MakeSphere_1.SetComment( 'MakeSphere from GEOM_Superv' )
104     MakeSphere_1.Coords( 201 , 332 )
105     IMakeSphere_1theX = MakeSphere_1.GetInPort( 'theX' )
106     IMakeSphere_1theY = MakeSphere_1.GetInPort( 'theY' )
107     IMakeSphere_1theZ = MakeSphere_1.GetInPort( 'theZ' )
108     IMakeSphere_1theRadius = MakeSphere_1.GetInPort( 'theRadius' )
109     IMakeSphere_1Gate = MakeSphere_1.GetInPort( 'Gate' )
110     OMakeSphere_1return = MakeSphere_1.GetOutPort( 'return' )
111     OMakeSphere_1Gate = MakeSphere_1.GetOutPort( 'Gate' )
112     
113     MakeFuse = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeFuse' )
114     MakeFuse.SetName( 'MakeFuse' )
115     MakeFuse.SetAuthor( '' )
116     MakeFuse.SetContainer( 'localhost/FactoryServer' )
117     MakeFuse.SetComment( 'MakeFuse from GEOM_Superv' )
118     MakeFuse.Coords( 790 , 148 )
119     IMakeFusetheShape1 = MakeFuse.GetInPort( 'theShape1' )
120     IMakeFusetheShape2 = MakeFuse.GetInPort( 'theShape2' )
121     IMakeFuseGate = MakeFuse.GetInPort( 'Gate' )
122     OMakeFusereturn = MakeFuse.GetOutPort( 'return' )
123     OMakeFuseGate = MakeFuse.GetOutPort( 'Gate' )
124     
125     MakeFuse_1 = GeomGraph.FNode( 'GEOM_Superv' , 'GEOM_Superv' , 'MakeFuse' )
126     MakeFuse_1.SetName( 'MakeFuse_1' )
127     MakeFuse_1.SetAuthor( '' )
128     MakeFuse_1.SetContainer( 'localhost/FactoryServer' )
129     MakeFuse_1.SetComment( 'MakeFuse from GEOM_Superv' )
130     MakeFuse_1.Coords( 993 , 312 )
131     IMakeFuse_1theShape1 = MakeFuse_1.GetInPort( 'theShape1' )
132     IMakeFuse_1theShape2 = MakeFuse_1.GetInPort( 'theShape2' )
133     IMakeFuse_1Gate = MakeFuse_1.GetInPort( 'Gate' )
134     OMakeFuse_1return = MakeFuse_1.GetOutPort( 'return' )
135     OMakeFuse_1Gate = MakeFuse_1.GetOutPort( 'Gate' )
136     
137     # Creation of Links
138     LSetStudyIDGateMakeBoxGate = GeomGraph.Link( OSetStudyIDGate , IMakeBoxGate )
139     
140     LSetStudyIDGateMakeSphere_1Gate = GeomGraph.Link( OSetStudyIDGate , IMakeSphere_1Gate )
141     
142     LMakeBoxreturnMakeCopytheOriginal = GeomGraph.Link( OMakeBoxreturn , IMakeCopytheOriginal )
143     
144     LMakeBoxreturnMakeCopy_1theOriginal = GeomGraph.Link( OMakeBoxreturn , IMakeCopy_1theOriginal )
145     
146     LMakeCopyreturnTranslateDXDYDZtheObject = GeomGraph.Link( OMakeCopyreturn , ITranslateDXDYDZtheObject )
147     
148     LTranslateDXDYDZreturnMakeFusetheShape1 = GeomGraph.Link( OTranslateDXDYDZreturn , IMakeFusetheShape1 )
149     
150     LMakeCopy_1returnMakeFusetheShape2 = GeomGraph.Link( OMakeCopy_1return , IMakeFusetheShape2 )
151     
152     LMakeSphere_1returnMakeFuse_1theShape2 = GeomGraph.Link( OMakeSphere_1return , IMakeFuse_1theShape2 )
153     
154     LMakeFusereturnMakeFuse_1theShape1 = GeomGraph.Link( OMakeFusereturn , IMakeFuse_1theShape1 )
155     
156     # Input datas
157     ISetStudyIDtheStudyID.Input( 1 )
158     IMakeBoxtheX1.Input( 0 )
159     IMakeBoxtheY1.Input( 0 )
160     IMakeBoxtheZ1.Input( 0 )
161     IMakeBoxtheX2.Input( 50 )
162     IMakeBoxtheY2.Input( 50 )
163     IMakeBoxtheZ2.Input( 50 )
164     ITranslateDXDYDZtheDX.Input( 10 )
165     ITranslateDXDYDZtheDY.Input( 10 )
166     ITranslateDXDYDZtheDZ.Input( 10 )
167     IMakeSphere_1theX.Input( 0 )
168     IMakeSphere_1theY.Input( 0 )
169     IMakeSphere_1theZ.Input( 0 )
170     IMakeSphere_1theRadius.Input( 12 )
171     
172     # Output Ports of the graph
173     #OMakeFuse_1return = MakeFuse_1.GetOutPort( 'return' )
174     return GeomGraph
175
176
177 GeomGraph = DefGeomGraph()