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 GraphEssai
26 GraphEssai = Graph( 'GraphEssai' )
27 GraphEssai.SetName( 'GraphEssai' )
28 GraphEssai.SetAuthor( '' )
29 GraphEssai.SetComment( '' )
30 GraphEssai.Coords( 0 , 0 )
32 # Creation of Factory Nodes
34 Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
37 Add.SetContainer( 'FactoryServer' )
38 Add.SetComment( 'Add from AddComponent' )
39 Add.Coords( 15 , 241 )
41 Sub = GraphEssai.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
44 Sub.SetContainer( 'FactoryServer' )
45 Sub.SetComment( 'Sub from SubComponent' )
46 Sub.Coords( 227 , 96 )
48 Mul = GraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
51 Mul.SetContainer( 'FactoryServer' )
52 Mul.SetComment( 'Mul from MulComponent' )
53 Mul.Coords( 435 , 242 )
55 Div = GraphEssai.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
58 Div.SetContainer( 'FactoryServer' )
59 Div.SetComment( 'Div from DivComponent' )
60 Div.Coords( 634 , 97 )
63 Addz = Add.Port( 'z' )
64 Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) )
66 Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) )
67 Suby.AddCoord( 1 , 197 , 204 )
68 Suby.AddCoord( 2 , 198 , 351 )
70 Subz = Sub.Port( 'z' )
71 Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) )
73 Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) )
74 Mulx.AddCoord( 1 , 411 , 323 )
75 Mulx.AddCoord( 2 , 411 , 177 )
77 Mulz = Mul.Port( 'z' )
78 Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) )
79 Divy.AddCoord( 1 , 612 , 207 )
80 Divy.AddCoord( 2 , 612 , 322 )
82 # Creation of Input datas
83 Addx = Add.Input( 'x' , 3)
84 Addy = Add.Input( 'y' , 4.5)
85 Subx = Sub.Input( 'x' , 1.5)
87 # Creation of Output variables
88 AddFuncValue = Add.Port( 'FuncValue' )
89 Divz = Div.Port( 'z' )
96 GraphEssai.PrintPorts()
98 nodes = GraphEssai.LevelNodes( 0 )
100 while i < len( nodes ) :
101 print 'Nodes of level 0',nodes[i].Name()
110 GraphEssai.PrintPorts()