Salome HOME
Merge from V6_main_20120808 08Aug12
[samples/datafiles.git] / Superv / Python / GraphEssai2.py
1 #  Copyright (C) 2007-2011  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.
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 # Generated python file of Graph GraphEssai2
23 #
24 from SuperV import *
25 # Graph creation 
26 GraphEssai2 = Graph( 'GraphEssai2' )
27 GraphEssai2.SetName( 'GraphEssai2' )
28 GraphEssai2.SetAuthor( '' )
29 GraphEssai2.SetComment( '' )
30 GraphEssai2.Coords( 0 , 0 )
31
32 # Creation of Factory Nodes
33
34 Add = GraphEssai2.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
35 Add.SetName( 'Add' )
36 Add.SetAuthor( '' )
37 Add.SetContainer( 'localhost/FactoryServer' )
38 Add.SetComment( 'Add from AddComponent' )
39 Add.Coords( 18 , 239 )
40
41 Sub = GraphEssai2.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
42 Sub.SetName( 'Sub' )
43 Sub.SetAuthor( '' )
44 Sub.SetContainer( 'localhost/FactoryServer' )
45 Sub.SetComment( 'Sub from SubComponent' )
46 Sub.Coords( 232 , 269 )
47
48 Mul = GraphEssai2.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
49 Mul.SetName( 'Mul' )
50 Mul.SetAuthor( '' )
51 Mul.SetContainer( 'localhost/FactoryServer' )
52 Mul.SetComment( 'Mul from MulComponent' )
53 Mul.Coords( 431 , 22 )
54
55 Div = GraphEssai2.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
56 Div.SetName( 'Div' )
57 Div.SetAuthor( '' )
58 Div.SetContainer( 'localhost/FactoryServer' )
59 Div.SetComment( 'Div from DivComponent' )
60 Div.Coords( 645 , 268 )
61
62 # Creation of Links
63 AddFuncValue = Add.Port( 'FuncValue' )
64 Mulx = GraphEssai2.Link( AddFuncValue , Mul.Port( 'x' ) )
65 Mulx.AddCoord( 1 , 199 , 102 )
66 Mulx.AddCoord( 2 , 198 , 319 )
67
68 Addz = Add.Port( 'z' )
69 Subx = GraphEssai2.Link( Addz , Sub.Port( 'x' ) )
70
71 Subz = Sub.Port( 'z' )
72 Divx = GraphEssai2.Link( Subz , Div.Port( 'x' ) )
73
74 SubOutGate = Sub.Port( 'OutGate' )
75 MulInGate = GraphEssai2.Link( SubOutGate , Mul.Port( 'InGate' ) )
76 MulInGate.AddCoord( 1 , 405 , 165 )
77 MulInGate.AddCoord( 2 , 405 , 412 )
78
79 Mulz = Mul.Port( 'z' )
80 Divy = GraphEssai2.Link( Mulz , Div.Port( 'y' ) )
81 Divy.AddCoord( 1 , 612 , 377 )
82 Divy.AddCoord( 2 , 612 , 103 )
83
84 # Creation of Input datas
85 Addx = Add.Input( 'x' , 1)
86 Addy = Add.Input( 'y' , 2)
87 Suby = Sub.Input( 'y' , 3)
88 Muly = Mul.Input( 'y' , 4)
89
90 # Creation of Output variables
91 Divz = Div.Port( 'z' )
92
93 GraphEssai2.Run()
94
95 GraphEssai2.DoneW()
96
97 GraphEssai2.State()
98
99 GraphEssai2.PrintPorts()
100