Salome HOME
0022763: [EDF] Shape processing
[samples/datafiles.git] / Superv / Python / GraphEssai1.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 GraphEssai1
24 #
25 from SuperV import *
26 # Graph creation 
27 GraphEssai1 = Graph( 'GraphEssai1' )
28 GraphEssai1.SetName( 'GraphEssai1' )
29 GraphEssai1.SetAuthor( '' )
30 GraphEssai1.SetComment( '' )
31 GraphEssai1.Coords( 0 , 0 )
32
33 # Creation of Factory Nodes
34
35 Add = GraphEssai1.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
36 Add.SetName( 'Add' )
37 Add.SetAuthor( '' )
38 Add.SetContainer( 'localhost/FactoryServer' )
39 Add.SetComment( 'Add from AddComponent' )
40 Add.Coords( 16 , 262 )
41
42 Sub = GraphEssai1.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
43 Sub.SetName( 'Sub' )
44 Sub.SetAuthor( '' )
45 Sub.SetContainer( 'localhost/FactoryServer' )
46 Sub.SetComment( 'Sub from SubComponent' )
47 Sub.Coords( 219 , 54 )
48
49 Mul = GraphEssai1.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
50 Mul.SetName( 'Mul' )
51 Mul.SetAuthor( '' )
52 Mul.SetContainer( 'localhost/FactoryServer' )
53 Mul.SetComment( 'Mul from MulComponent' )
54 Mul.Coords( 419 , 262 )
55
56 Div = GraphEssai1.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
57 Div.SetName( 'Div' )
58 Div.SetAuthor( '' )
59 Div.SetContainer( 'localhost/FactoryServer' )
60 Div.SetComment( 'Div from DivComponent' )
61 Div.Coords( 623 , 55 )
62
63 # Creation of Links
64 Addz = Add.Port( 'z' )
65 Subx = GraphEssai1.Link( Addz , Sub.Port( 'x' ) )
66 Subx.AddCoord( 1 , 193 , 135 )
67 Subx.AddCoord( 2 , 193 , 372 )
68
69 Subz = Sub.Port( 'z' )
70 Divx = GraphEssai1.Link( Subz , Div.Port( 'x' ) )
71
72 Mulx = GraphEssai1.Link( Subz , Mul.Port( 'x' ) )
73 Mulx.AddCoord( 1 , 396 , 343 )
74 Mulx.AddCoord( 2 , 397 , 136 )
75
76 Mulz = Mul.Port( 'z' )
77 Divy = GraphEssai1.Link( Mulz , Div.Port( 'y' ) )
78 Divy.AddCoord( 1 , 598 , 163 )
79 Divy.AddCoord( 2 , 598 , 343 )
80
81 # Creation of Input datas
82 Addx = Add.Input( 'x' , 3)
83 Addy = Add.Input( 'y' , 5)
84 Suby = Sub.Input( 'y' , 7)
85 Muly = Mul.Input( 'y' , 11)
86
87 # Creation of Output variables
88 AddFuncValue = Add.Port( 'FuncValue' )
89 Divz = Div.Port( 'z' )
90
91 GraphEssai1.Run()
92
93 GraphEssai1.DoneW()
94
95 GraphEssai1.State()
96
97 GraphEssai1.PrintPorts()
98