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