Salome HOME
Imported using TkCVS
[samples/datafiles.git] / Superv / Python / GraphEssai2.py
1
2 # Generated python file of Graph GraphEssai2
3
4 from SuperV import *
5 # Graph creation 
6 GraphEssai2 = Graph( 'GraphEssai2' )
7 GraphEssai2.SetName( 'GraphEssai2' )
8 GraphEssai2.SetAuthor( '' )
9 GraphEssai2.SetComment( '' )
10 GraphEssai2.Coords( 0 , 0 )
11
12 # Creation of Factory Nodes
13
14 Add = GraphEssai2.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
15 Add.SetName( 'Add' )
16 Add.SetAuthor( '' )
17 Add.SetContainer( 'localhost/FactoryServer' )
18 Add.SetComment( 'Add from AddComponent' )
19 Add.Coords( 18 , 239 )
20
21 Sub = GraphEssai2.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
22 Sub.SetName( 'Sub' )
23 Sub.SetAuthor( '' )
24 Sub.SetContainer( 'localhost/FactoryServer' )
25 Sub.SetComment( 'Sub from SubComponent' )
26 Sub.Coords( 232 , 269 )
27
28 Mul = GraphEssai2.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
29 Mul.SetName( 'Mul' )
30 Mul.SetAuthor( '' )
31 Mul.SetContainer( 'localhost/FactoryServer' )
32 Mul.SetComment( 'Mul from MulComponent' )
33 Mul.Coords( 431 , 22 )
34
35 Div = GraphEssai2.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
36 Div.SetName( 'Div' )
37 Div.SetAuthor( '' )
38 Div.SetContainer( 'localhost/FactoryServer' )
39 Div.SetComment( 'Div from DivComponent' )
40 Div.Coords( 645 , 268 )
41
42 # Creation of Links
43 AddFuncValue = Add.Port( 'FuncValue' )
44 Mulx = GraphEssai2.Link( AddFuncValue , Mul.Port( 'x' ) )
45 Mulx.AddCoord( 1 , 199 , 102 )
46 Mulx.AddCoord( 2 , 198 , 319 )
47
48 Addz = Add.Port( 'z' )
49 Subx = GraphEssai2.Link( Addz , Sub.Port( 'x' ) )
50
51 Subz = Sub.Port( 'z' )
52 Divx = GraphEssai2.Link( Subz , Div.Port( 'x' ) )
53
54 SubOutGate = Sub.Port( 'OutGate' )
55 MulInGate = GraphEssai2.Link( SubOutGate , Mul.Port( 'InGate' ) )
56 MulInGate.AddCoord( 1 , 405 , 165 )
57 MulInGate.AddCoord( 2 , 405 , 412 )
58
59 Mulz = Mul.Port( 'z' )
60 Divy = GraphEssai2.Link( Mulz , Div.Port( 'y' ) )
61 Divy.AddCoord( 1 , 612 , 377 )
62 Divy.AddCoord( 2 , 612 , 103 )
63
64 # Creation of Input datas
65 Addx = Add.Input( 'x' , 1)
66 Addy = Add.Input( 'y' , 2)
67 Suby = Sub.Input( 'y' , 3)
68 Muly = Mul.Input( 'y' , 4)
69
70 # Creation of Output variables
71 Divz = Div.Port( 'z' )
72
73 GraphEssai2.Run()
74
75 GraphEssai2.DoneW()
76
77 GraphEssai2.State()
78
79 GraphEssai2.PrintPorts()
80