Salome HOME
993ddc86a523cead88dac278f594417b25a502f7
[samples/datafiles.git] / Superv / Python / GraphEssai2.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 GraphEssai2
24 #
25 from SuperV import *
26 # Graph creation 
27 GraphEssai2 = Graph( 'GraphEssai2' )
28 GraphEssai2.SetName( 'GraphEssai2' )
29 GraphEssai2.SetAuthor( '' )
30 GraphEssai2.SetComment( '' )
31 GraphEssai2.Coords( 0 , 0 )
32
33 # Creation of Factory Nodes
34
35 Add = GraphEssai2.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( 18 , 239 )
41
42 Sub = GraphEssai2.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( 232 , 269 )
48
49 Mul = GraphEssai2.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( 431 , 22 )
55
56 Div = GraphEssai2.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( 645 , 268 )
62
63 # Creation of Links
64 AddFuncValue = Add.Port( 'FuncValue' )
65 Mulx = GraphEssai2.Link( AddFuncValue , Mul.Port( 'x' ) )
66 Mulx.AddCoord( 1 , 199 , 102 )
67 Mulx.AddCoord( 2 , 198 , 319 )
68
69 Addz = Add.Port( 'z' )
70 Subx = GraphEssai2.Link( Addz , Sub.Port( 'x' ) )
71
72 Subz = Sub.Port( 'z' )
73 Divx = GraphEssai2.Link( Subz , Div.Port( 'x' ) )
74
75 SubOutGate = Sub.Port( 'OutGate' )
76 MulInGate = GraphEssai2.Link( SubOutGate , Mul.Port( 'InGate' ) )
77 MulInGate.AddCoord( 1 , 405 , 165 )
78 MulInGate.AddCoord( 2 , 405 , 412 )
79
80 Mulz = Mul.Port( 'z' )
81 Divy = GraphEssai2.Link( Mulz , Div.Port( 'y' ) )
82 Divy.AddCoord( 1 , 612 , 377 )
83 Divy.AddCoord( 2 , 612 , 103 )
84
85 # Creation of Input datas
86 Addx = Add.Input( 'x' , 1)
87 Addy = Add.Input( 'y' , 2)
88 Suby = Sub.Input( 'y' , 3)
89 Muly = Mul.Input( 'y' , 4)
90
91 # Creation of Output variables
92 Divz = Div.Port( 'z' )
93
94 GraphEssai2.Run()
95
96 GraphEssai2.DoneW()
97
98 GraphEssai2.State()
99
100 GraphEssai2.PrintPorts()
101