Salome HOME
211679c982e0c80c3115af568b98c49c2426b333
[samples/datafiles.git] / Superv / Python / GraphEssai1.py
1
2 # Generated python file of Graph GraphEssai1
3
4 from SuperV import *
5 # Graph creation 
6 GraphEssai1 = Graph( 'GraphEssai1' )
7 GraphEssai1.SetName( 'GraphEssai1' )
8 GraphEssai1.SetAuthor( '' )
9 GraphEssai1.SetComment( '' )
10 GraphEssai1.Coords( 0 , 0 )
11
12 # Creation of Factory Nodes
13
14 Add = GraphEssai1.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( 16 , 262 )
20
21 Sub = GraphEssai1.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( 219 , 54 )
27
28 Mul = GraphEssai1.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( 419 , 262 )
34
35 Div = GraphEssai1.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( 623 , 55 )
41
42 # Creation of Links
43 Addz = Add.Port( 'z' )
44 Subx = GraphEssai1.Link( Addz , Sub.Port( 'x' ) )
45 Subx.AddCoord( 1 , 193 , 135 )
46 Subx.AddCoord( 2 , 193 , 372 )
47
48 Subz = Sub.Port( 'z' )
49 Divx = GraphEssai1.Link( Subz , Div.Port( 'x' ) )
50
51 Mulx = GraphEssai1.Link( Subz , Mul.Port( 'x' ) )
52 Mulx.AddCoord( 1 , 396 , 343 )
53 Mulx.AddCoord( 2 , 397 , 136 )
54
55 Mulz = Mul.Port( 'z' )
56 Divy = GraphEssai1.Link( Mulz , Div.Port( 'y' ) )
57 Divy.AddCoord( 1 , 598 , 163 )
58 Divy.AddCoord( 2 , 598 , 343 )
59
60 # Creation of Input datas
61 Addx = Add.Input( 'x' , 3)
62 Addy = Add.Input( 'y' , 5)
63 Suby = Sub.Input( 'y' , 7)
64 Muly = Mul.Input( 'y' , 11)
65
66 # Creation of Output variables
67 AddFuncValue = Add.Port( 'FuncValue' )
68 Divz = Div.Port( 'z' )
69
70 GraphEssai1.Run()
71
72 GraphEssai1.DoneW()
73
74 GraphEssai1.State()
75
76 GraphEssai1.PrintPorts()
77