]> SALOME platform Git repositories - modules/superv.git/blob - examples/GeomGraph.py
Salome HOME
NRI : Rename Geometry component and interface by GEOM.
[modules/superv.git] / examples / GeomGraph.py
1
2 # Generated python file of Graph GeomGraph
3
4 from SuperV import *
5 # Graph creation 
6 GeomGraph = Graph( 'GeomGraph' )
7 GeomGraph.SetName( 'GeomGraph' )
8 GeomGraph.SetAuthor( '' )
9 GeomGraph.SetComment( '' )
10 GeomGraph.Coords( 0 , 0 )
11
12 # Creation of Factory Nodes
13 MakeBox = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeBox' )
14 MakeBox.SetName( 'MakeBox' )
15 MakeBox.SetAuthor( '' )
16 MakeBox.SetContainer( 'localhost/FactoryServer' )
17 MakeBox.SetComment( 'MakeBox from Geometry' )
18 MakeBox.Coords( 5 , 101 )
19 MakeCopy = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeCopy' )
20 MakeCopy.SetName( 'MakeCopy' )
21 MakeCopy.SetAuthor( '' )
22 MakeCopy.SetContainer( 'localhost/FactoryServer' )
23 MakeCopy.SetComment( 'MakeCopy from Geometry' )
24 MakeCopy.Coords( 235 , 77 )
25 MakeCopy_1 = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeCopy' )
26 MakeCopy_1.SetName( 'MakeCopy_1' )
27 MakeCopy_1.SetAuthor( '' )
28 MakeCopy_1.SetContainer( 'localhost/FactoryServer' )
29 MakeCopy_1.SetComment( 'MakeCopy from Geometry' )
30 MakeCopy_1.Coords( 232 , 332 )
31 MakeTranslation = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeTranslation' )
32 MakeTranslation.SetName( 'MakeTranslation' )
33 MakeTranslation.SetAuthor( '' )
34 MakeTranslation.SetContainer( 'localhost/FactoryServer' )
35 MakeTranslation.SetComment( 'MakeTranslation from Geometry' )
36 MakeTranslation.Coords( 449 , 86 )
37 MakeFuse = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeFuse' )
38 MakeFuse.SetName( 'MakeFuse' )
39 MakeFuse.SetAuthor( '' )
40 MakeFuse.SetContainer( 'localhost/FactoryServer' )
41 MakeFuse.SetComment( 'MakeFuse from Geometry' )
42 MakeFuse.Coords( 678 , 224 )
43 MakeFuse_1 = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeFuse' )
44 MakeFuse_1.SetName( 'MakeFuse_1' )
45 MakeFuse_1.SetAuthor( '' )
46 MakeFuse_1.SetContainer( 'localhost/FactoryServer' )
47 MakeFuse_1.SetComment( 'MakeFuse from Geometry' )
48 MakeFuse_1.Coords( 909 , 340 )
49 MakeSphere = GeomGraph.FNode( 'GEOM' , 'GEOM' , 'MakeSphere' )
50 MakeSphere.SetName( 'MakeSphere' )
51 MakeSphere.SetAuthor( '' )
52 MakeSphere.SetContainer( 'localhost/FactoryServer' )
53 MakeSphere.SetComment( 'MakeSphere from Geometry' )
54 MakeSphere.Coords( 5 , 449 )
55
56 # Creation of intermediate Output variables and of Control Links
57 MakeBoxshape = MakeBox.Port( 'shape' )
58 MakeCopyshape1 = GeomGraph.Link( MakeBoxshape , MakeCopy.Port( 'shape1' ) )
59 MakeCopyshape1.AddCoord( 1 , 198 , 184 )
60 MakeCopyshape1.AddCoord( 2 , 199 , 209 )
61 MakeCopy_1shape1 = GeomGraph.Link( MakeBoxshape , MakeCopy_1.Port( 'shape1' ) )
62 MakeCopy_1shape1.AddCoord( 1 , 198 , 441 )
63 MakeCopy_1shape1.AddCoord( 2 , 198 , 209 )
64 MakeCopyshape = MakeCopy.Port( 'shape' )
65 MakeTranslationshape1 = GeomGraph.Link( MakeCopyshape , MakeTranslation.Port( 'shape1' ) )
66 MakeCopy_1shape = MakeCopy_1.Port( 'shape' )
67 MakeFuseshape2 = GeomGraph.Link( MakeCopy_1shape , MakeFuse.Port( 'shape2' ) )
68 MakeFuseshape2.AddCoord( 1 , 642 , 362 )
69 MakeFuseshape2.AddCoord( 2 , 642 , 442 )
70 MakeTranslationshape = MakeTranslation.Port( 'shape' )
71 MakeFuseshape1 = GeomGraph.Link( MakeTranslationshape , MakeFuse.Port( 'shape1' ) )
72 MakeFuseshape1.AddCoord( 1 , 643 , 330 )
73 MakeFuseshape1.AddCoord( 2 , 644 , 195 )
74 MakeFuseshape = MakeFuse.Port( 'shape' )
75 MakeFuse_1shape1 = GeomGraph.Link( MakeFuseshape , MakeFuse_1.Port( 'shape1' ) )
76 MakeFuse_1shape1.AddCoord( 1 , 872 , 445 )
77 MakeFuse_1shape1.AddCoord( 2 , 874 , 333 )
78 MakeSphereshape = MakeSphere.Port( 'shape' )
79 MakeFuse_1shape2 = GeomGraph.Link( MakeSphereshape , MakeFuse_1.Port( 'shape2' ) )
80 MakeFuse_1shape2.AddCoord( 1 , 872 , 474 )
81 MakeFuse_1shape2.AddCoord( 2 , 871 , 552 )
82
83 # Creation of Input datas
84 MakeBoxx1 = MakeBox.Input( 'x1' , 0)
85 MakeBoxy1 = MakeBox.Input( 'y1' , 0)
86 MakeBoxz1 = MakeBox.Input( 'z1' , 0)
87 MakeBoxx2 = MakeBox.Input( 'x2' , 50)
88 MakeBoxy2 = MakeBox.Input( 'y2' , 50)
89 MakeBoxz2 = MakeBox.Input( 'z2' , 50)
90 MakeTranslationx1 = MakeTranslation.Input( 'x1' , 25)
91 MakeTranslationy1 = MakeTranslation.Input( 'y1' , 25)
92 MakeTranslationz1 = MakeTranslation.Input( 'z1' , 25)
93 MakeSpherex1 = MakeSphere.Input( 'x1' , 0)
94 MakeSpherey1 = MakeSphere.Input( 'y1' , 0)
95 MakeSpherez1 = MakeSphere.Input( 'z1' , 0)
96 MakeSphereradius = MakeSphere.Input( 'radius' , 12)
97
98 # Creation of Output variables
99 MakeFuse_1shape = MakeFuse_1.Port( 'shape' )
100
101 GeomGraph.Run()
102
103 GeomGraph.DoneW()
104
105 GeomGraph.PrintPorts()
106