Salome HOME
d8335e3dcbd1e4d1e59c2502f42c3800ce548d1d
[samples/datafiles.git] / Superv / Python / GraphUnValid.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 GraphUnValid
23 #
24 from SuperV import *
25
26 # Graph creation of GraphUnValid
27 def DefGraphUnValid() :
28     GraphUnValid = Graph( 'GraphUnValid' )
29     GraphUnValid.SetName( 'GraphUnValid' )
30     GraphUnValid.SetAuthor( 'JR' )
31     GraphUnValid.SetComment( '' )
32     GraphUnValid.Coords( 0 , 0 )
33     
34     # Creation of Factory Nodes
35     
36     Add = GraphUnValid.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
37     Add.SetName( 'Add' )
38     Add.SetAuthor( '' )
39     Add.SetContainer( 'FactoryServer' )
40     Add.SetComment( 'Add from AddComponent' )
41     Add.Coords( 8 , 62 )
42     IAddx = Add.GetInPort( 'x' )
43     IAddy = Add.GetInPort( 'y' )
44     IAddGate = Add.GetInPort( 'Gate' )
45     OAddFuncValue = Add.GetOutPort( 'FuncValue' )
46     OAddz = Add.GetOutPort( 'z' )
47     OAddGate = Add.GetOutPort( 'Gate' )
48     
49     Sub = GraphUnValid.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
50     Sub.SetName( 'Sub' )
51     Sub.SetAuthor( '' )
52     Sub.SetContainer( 'FactoryServer' )
53     Sub.SetComment( 'Sub from SubComponent' )
54     Sub.Coords( 203 , 4 )
55     ISubx = Sub.GetInPort( 'x' )
56     ISuby = Sub.GetInPort( 'y' )
57     ISubGate = Sub.GetInPort( 'Gate' )
58     OSubz = Sub.GetOutPort( 'z' )
59     OSubGate = Sub.GetOutPort( 'Gate' )
60     
61     Mul = GraphUnValid.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
62     Mul.SetName( 'Mul' )
63     Mul.SetAuthor( '' )
64     Mul.SetContainer( 'FactoryServer' )
65     Mul.SetComment( 'Mul from MulComponent' )
66     Mul.Coords( 390 , 62 )
67     IMulx = Mul.GetInPort( 'x' )
68     IMuly = Mul.GetInPort( 'y' )
69     IMulGate = Mul.GetInPort( 'Gate' )
70     OMulz = Mul.GetOutPort( 'z' )
71     OMulGate = Mul.GetOutPort( 'Gate' )
72     
73     Div = GraphUnValid.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
74     Div.SetName( 'Div' )
75     Div.SetAuthor( '' )
76     Div.SetContainer( 'FactoryServer' )
77     Div.SetComment( 'Div from DivComponent' )
78     Div.Coords( 575 , 11 )
79     IDivx = Div.GetInPort( 'x' )
80     IDivy = Div.GetInPort( 'y' )
81     IDivGate = Div.GetInPort( 'Gate' )
82     ODivz = Div.GetOutPort( 'z' )
83     ODivGate = Div.GetOutPort( 'Gate' )
84     
85     # Creation of Links
86     LAddzMuly = GraphUnValid.Link( OAddz , IMuly )
87     
88     LAddzSuby = GraphUnValid.Link( OAddz , ISuby )
89     LAddzSuby.AddCoord( 1 , 182 , 113 )
90     LAddzSuby.AddCoord( 2 , 183 , 170 )
91     
92     LSubzDivx = GraphUnValid.Link( OSubz , IDivx )
93     LSubzDivx.AddCoord( 1 , 566 , 91 )
94     LSubzDivx.AddCoord( 2 , 566 , 49 )
95     LSubzDivx.AddCoord( 3 , 380 , 49 )
96     LSubzDivx.AddCoord( 4 , 379 , 84 )
97     
98     LSubzMulx = GraphUnValid.Link( OSubz , IMulx )
99     LSubzMulx.AddCoord( 1 , 379 , 141 )
100     LSubzMulx.AddCoord( 2 , 378 , 85 )
101     
102     LMulzDivy = GraphUnValid.Link( OMulz , IDivy )
103     LMulzDivy.AddCoord( 1 , 565 , 120 )
104     LMulzDivy.AddCoord( 2 , 565 , 141 )
105     
106     LMulzSubx = GraphUnValid.Link( OMulz , ISubx )
107     LMulzSubx.AddCoord( 1 , 194 , 84 )
108     LMulzSubx.AddCoord( 2 , 195 , 252 )
109     LMulzSubx.AddCoord( 3 , 566 , 252 )
110     LMulzSubx.AddCoord( 4 , 565 , 141 )
111     
112     # Input datas
113     IAddx.Input( 3 )
114     IAddy.Input( 4.5 )
115     
116     # Output Ports of the graph
117     #OAddFuncValue = Add.GetOutPort( 'FuncValue' )
118     #ODivz = Div.GetOutPort( 'z' )
119     return GraphUnValid
120
121
122 GraphUnValid = DefGraphUnValid()