Salome HOME
Imported using TkCVS
[samples/datafiles.git] / Superv / Python / Graphs.py
1
2 # Generated python file of Graph Graphs
3
4 from SuperV import *
5 # Graph creation 
6 Graphs = Graph( 'Graphs' )
7 Graphs.SetName( 'Graphs' )
8 Graphs.SetAuthor( '' )
9 Graphs.SetComment( '' )
10 Graphs.Coords( 0 , 0 )
11
12 # Creation of Factory Nodes
13
14 Add = Graphs.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( 30 , 8 )
20
21 Sub = Graphs.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( 241 , 38 )
27
28 Mul = Graphs.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( 439 , 39 )
34
35 Div = Graphs.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( 633 , 120 )
41
42 Add_1 = Graphs.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
43 Add_1.SetName( 'Add_1' )
44 Add_1.SetAuthor( '' )
45 Add_1.SetContainer( 'localhost/FactoryServer' )
46 Add_1.SetComment( 'Add from AddComponent' )
47 Add_1.Coords( 13 , 297 )
48
49 Sub_1 = Graphs.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
50 Sub_1.SetName( 'Sub_1' )
51 Sub_1.SetAuthor( '' )
52 Sub_1.SetContainer( 'localhost/FactoryServer' )
53 Sub_1.SetComment( 'Sub from SubComponent' )
54 Sub_1.Coords( 235 , 217 )
55
56 Mul_1 = Graphs.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
57 Mul_1.SetName( 'Mul_1' )
58 Mul_1.SetAuthor( '' )
59 Mul_1.SetContainer( 'localhost/FactoryServer' )
60 Mul_1.SetComment( 'Mul from MulComponent' )
61 Mul_1.Coords( 423 , 375 )
62
63 Div_1 = Graphs.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
64 Div_1.SetName( 'Div_1' )
65 Div_1.SetAuthor( '' )
66 Div_1.SetContainer( 'localhost/FactoryServer' )
67 Div_1.SetComment( 'Div from DivComponent' )
68 Div_1.Coords( 630 , 284 )
69
70 # Creation of Links
71 Addz = Add.Port( 'z' )
72 Subx = Graphs.Link( Addz , Sub.Port( 'x' ) )
73
74 Subz = Sub.Port( 'z' )
75 Divx = Graphs.Link( Subz , Div.Port( 'x' ) )
76 Divx.AddCoord( 1 , 426 , 201 )
77 Divx.AddCoord( 2 , 425 , 119 )
78
79 Mulx = Graphs.Link( Subz , Mul.Port( 'x' ) )
80
81 Mulz = Mul.Port( 'z' )
82 Divy = Graphs.Link( Mulz , Div.Port( 'y' ) )
83 Divy.AddCoord( 1 , 619 , 230 )
84 Divy.AddCoord( 2 , 620 , 120 )
85
86 Add_1FuncValue = Add_1.Port( 'FuncValue' )
87 Mul_1x = Graphs.Link( Add_1FuncValue , Mul_1.Port( 'x' ) )
88 Mul_1x.AddCoord( 1 , 396 , 455 )
89 Mul_1x.AddCoord( 2 , 395 , 378 )
90
91 Sub_1x = Graphs.Link( Add_1FuncValue , Sub_1.Port( 'x' ) )
92 Sub_1x.AddCoord( 1 , 215 , 297 )
93 Sub_1x.AddCoord( 2 , 215 , 378 )
94
95 Add_1z = Add_1.Port( 'z' )
96 Sub_1y = Graphs.Link( Add_1z , Sub_1.Port( 'y' ) )
97 Sub_1y.AddCoord( 1 , 197 , 327 )
98 Sub_1y.AddCoord( 2 , 196 , 406 )
99
100 Sub_1z = Sub_1.Port( 'z' )
101 Div_1x = Graphs.Link( Sub_1z , Div_1.Port( 'x' ) )
102 Div_1x.AddCoord( 1 , 604 , 364 )
103 Div_1x.AddCoord( 2 , 603 , 297 )
104
105 Mul_1z = Mul_1.Port( 'z' )
106 Div_1y = Graphs.Link( Mul_1z , Div_1.Port( 'y' ) )
107 Div_1y.AddCoord( 1 , 610 , 394 )
108 Div_1y.AddCoord( 2 , 610 , 455 )
109
110 # Creation of Input datas
111 Addx = Add.Input( 'x' , 3)
112 Addy = Add.Input( 'y' , 5)
113 Suby = Sub.Input( 'y' , 7)
114 Muly = Mul.Input( 'y' , 11)
115 Add_1x = Add_1.Input( 'x' , 1)
116 Add_1y = Add_1.Input( 'y' , 2)
117 Mul_1y = Mul_1.Input( 'y' , 4)
118
119 # Creation of Output variables
120 AddFuncValue = Add.Port( 'FuncValue' )
121 Divz = Div.Port( 'z' )
122 Div_1z = Div_1.Port( 'z' )
123
124 Graphs.Run()
125
126 Graphs.DoneW()
127
128 Graphs.State()
129
130 Graphs.PrintPorts()
131