Salome HOME
Fix for improvement IPAL9815 : Remove "Add Port" functionality as duplicate of "Edit...
[modules/superv.git] / examples / NewGraphGeomEssai.py_old
1 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3
4 #  This library is free software; you can redistribute it and/or 
5 #  modify it under the terms of the GNU Lesser General Public 
6 #  License as published by the Free Software Foundation; either 
7 #  version 2.1 of the License. 
8
9 #  This library is distributed in the hope that it will be useful, 
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 #  Lesser General Public License for more details. 
13
14 #  You should have received a copy of the GNU Lesser General Public 
15 #  License along with this library; if not, write to the Free Software 
16 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17
18 #  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 #
20 #
21 #
22 #  File   : NewGraphGeomEssai.py
23 #  Module : SuperVisionTest
24
25 from SuperV import *
26 # Graph creation 
27 NewGraphGeomEssai = Graph( 'NewGraphGeomEssai' )
28 print NewGraphGeomEssai.SetAuthor( '' )
29 print NewGraphGeomEssai.SetComment( '' )
30 NewGraphGeomEssai.Coords( 0 , 0 )
31
32 # Creation of Nodes
33 MakeSphere = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeSphere' )
34 print MakeSphere.SetAuthor( '' )
35 print MakeSphere.SetContainer( 'FactoryServer' )
36 print MakeSphere.SetComment( '' )
37 MakeSphere.Coords( 17 , 75 )
38 MakeCopy = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeCopy' )
39 print MakeCopy.SetAuthor( '' )
40 print MakeCopy.SetContainer( 'FactoryServer' )
41 print MakeCopy.SetComment( '' )
42 MakeCopy.Coords( 219 , 12 )
43 MakeTranslation = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeTranslation' )
44 print MakeTranslation.SetAuthor( '' )
45 print MakeTranslation.SetContainer( 'FactoryServer' )
46 print MakeTranslation.SetComment( '' )
47 MakeTranslation.Coords( 221 , 209 )
48 MakeFuse = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeFuse' )
49 print MakeFuse.SetAuthor( '' )
50 print MakeFuse.SetContainer( 'FactoryServer' )
51 print MakeFuse.SetComment( '' )
52 MakeFuse.Coords( 465 , 106 )
53
54 # Creation of intermediate Output variables and of links
55 MakeSpheresphere = MakeSphere.Port( 'shape' )
56 MakeCopyshape = NewGraphGeomEssai.Link( MakeSpheresphere , MakeCopy.Port( 'shape1' ) )
57 MakeTranslationshape = NewGraphGeomEssai.Link( MakeSpheresphere , MakeTranslation.Port( 'shape1' ) )
58 MakeCopycopy = MakeCopy.Port( 'shape' )
59 MakeFuseshape1 = NewGraphGeomEssai.Link( MakeCopycopy , MakeFuse.Port( 'shape1' ) )
60 MakeTranslationtranslation = MakeTranslation.Port( 'shape' )
61 MakeFuseshape2 = NewGraphGeomEssai.Link( MakeTranslationtranslation , MakeFuse.Port( 'shape2' ) )
62
63 # Creation of Input datas
64 MakeSpherex1 = MakeSphere.Input( 'x1' , 0)
65 MakeSpherey1 = MakeSphere.Input( 'y1' , 0)
66 MakeSpherez1 = MakeSphere.Input( 'z1' , 0)
67 MakeSphereradius = MakeSphere.Input( 'radius' , 50)
68 MakeTranslationx1 = MakeTranslation.Input( 'x1' , 80)
69 MakeTranslationy1 = MakeTranslation.Input( 'y1' , 0)
70 MakeTranslationz1 = MakeTranslation.Input( 'z1' , 0)
71
72 # Missing Input datas
73
74 # Creation of Output variables
75 MakeFuseresult = MakeFuse.Port( 'shape' )
76
77 NewGraphGeomEssai.Run()
78
79 NewGraphGeomEssai.DoneW()
80
81 NewGraphGeomEssai.State()
82
83 NewGraphGeomEssai.PrintPorts()
84