# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # # # # File : NewGraphGeomEssai.py # Module : SuperVisionTest from SuperV import * # Graph creation NewGraphGeomEssai = Graph( 'NewGraphGeomEssai' ) print NewGraphGeomEssai.SetAuthor( '' ) print NewGraphGeomEssai.SetComment( '' ) NewGraphGeomEssai.Coords( 0 , 0 ) # Creation of Nodes MakeSphere = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeSphere' ) print MakeSphere.SetAuthor( '' ) print MakeSphere.SetContainer( 'FactoryServer' ) print MakeSphere.SetComment( '' ) MakeSphere.Coords( 17 , 75 ) MakeCopy = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeCopy' ) print MakeCopy.SetAuthor( '' ) print MakeCopy.SetContainer( 'FactoryServer' ) print MakeCopy.SetComment( '' ) MakeCopy.Coords( 219 , 12 ) MakeTranslation = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeTranslation' ) print MakeTranslation.SetAuthor( '' ) print MakeTranslation.SetContainer( 'FactoryServer' ) print MakeTranslation.SetComment( '' ) MakeTranslation.Coords( 221 , 209 ) MakeFuse = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeFuse' ) print MakeFuse.SetAuthor( '' ) print MakeFuse.SetContainer( 'FactoryServer' ) print MakeFuse.SetComment( '' ) MakeFuse.Coords( 465 , 106 ) # Creation of intermediate Output variables and of links MakeSpheresphere = MakeSphere.Port( 'shape' ) MakeCopyshape = NewGraphGeomEssai.Link( MakeSpheresphere , MakeCopy.Port( 'shape1' ) ) MakeTranslationshape = NewGraphGeomEssai.Link( MakeSpheresphere , MakeTranslation.Port( 'shape1' ) ) MakeCopycopy = MakeCopy.Port( 'shape' ) MakeFuseshape1 = NewGraphGeomEssai.Link( MakeCopycopy , MakeFuse.Port( 'shape1' ) ) MakeTranslationtranslation = MakeTranslation.Port( 'shape' ) MakeFuseshape2 = NewGraphGeomEssai.Link( MakeTranslationtranslation , MakeFuse.Port( 'shape2' ) ) # Creation of Input datas MakeSpherex1 = MakeSphere.Input( 'x1' , 0) MakeSpherey1 = MakeSphere.Input( 'y1' , 0) MakeSpherez1 = MakeSphere.Input( 'z1' , 0) MakeSphereradius = MakeSphere.Input( 'radius' , 50) MakeTranslationx1 = MakeTranslation.Input( 'x1' , 80) MakeTranslationy1 = MakeTranslation.Input( 'y1' , 0) MakeTranslationz1 = MakeTranslation.Input( 'z1' , 0) # Missing Input datas # Creation of Output variables MakeFuseresult = MakeFuse.Port( 'shape' ) NewGraphGeomEssai.Run() NewGraphGeomEssai.DoneW() NewGraphGeomEssai.State() NewGraphGeomEssai.PrintPorts()