1 # Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Generated python file of Graph GraphEmbeddedComponentsCrash
26 # Graph creation of GraphEmbeddedComponentsCrash
27 def DefGraphEmbeddedComponentsCrash() :
28 GraphEmbeddedComponentsCrash = Graph( 'GraphEmbeddedComponentsCrash' )
29 GraphEmbeddedComponentsCrash.SetName( 'GraphEmbeddedComponentsCrash' )
30 GraphEmbeddedComponentsCrash.SetAuthor( '' )
31 GraphEmbeddedComponentsCrash.SetComment( '' )
32 GraphEmbeddedComponentsCrash.Coords( 0 , 0 )
34 # Creation of Factory Nodes
36 Add = GraphEmbeddedComponentsCrash.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
39 Add.SetContainer( 'localhost/FactoryServer' )
40 Add.SetComment( 'Add from AddComponent' )
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' )
49 Sub = GraphEmbeddedComponentsCrash.FNode( 'SubComponent' , 'SubComponent' , 'Sub' )
52 Sub.SetContainer( 'localhost/FactoryServer' )
53 Sub.SetComment( 'Sub from SubComponent' )
54 Sub.Coords( 477 , 381 )
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' )
61 Mul = GraphEmbeddedComponentsCrash.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
64 Mul.SetContainer( 'localhost/FactoryServer' )
65 Mul.SetComment( 'Mul from MulComponent' )
66 Mul.Coords( 480 , 152 )
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' )
73 Div = GraphEmbeddedComponentsCrash.FNode( 'DivComponent' , 'DivComponent' , 'Div' )
76 Div.SetContainer( 'localhost/FactoryServer' )
77 Div.SetComment( 'Div from DivComponent' )
78 Div.Coords( 714 , 136 )
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' )
85 Addition = GraphEmbeddedComponentsCrash.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
86 Addition.SetName( 'Addition' )
87 Addition.SetAuthor( '' )
88 Addition.SetContainer( 'localhost/AdditionServer' )
89 Addition.SetComment( 'Addition from AddComponent' )
90 Addition.Coords( 0 , 0 )
91 IAdditionGate = Addition.GetInPort( 'Gate' )
92 OAdditionAdder = Addition.GetOutPort( 'Adder' )
93 OAdditionGate = Addition.GetOutPort( 'Gate' )
95 Addition_1 = GraphEmbeddedComponentsCrash.FNode( 'AddComponent' , 'AddComponent' , 'Addition' )
96 Addition_1.SetName( 'Addition_1' )
97 Addition_1.SetAuthor( '' )
98 Addition_1.SetContainer( 'localhost/Addition_1Server' )
99 Addition_1.SetComment( 'Addition from AddComponent' )
100 Addition_1.Coords( 4 , 327 )
101 IAddition_1Gate = Addition_1.GetInPort( 'Gate' )
102 OAddition_1Adder = Addition_1.GetOutPort( 'Adder' )
103 OAddition_1Gate = Addition_1.GetOutPort( 'Gate' )
105 # Creation of Computing Nodes
106 AddAndCompare_ServiceinParameter = []
107 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'Adder' ) )
108 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'x' ) )
109 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'y' ) )
110 AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'anOtherAdder' ) )
111 AddAndCompare_ServiceoutParameter = []
112 AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'FuncValue' ) )
113 AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'z' ) )
114 AddAndCompare_ServiceinStreamParameter = []
115 AddAndCompare_ServiceoutStreamParameter = []
116 AddAndCompare_Service = SALOME_ModuleCatalog.Service( 'AddAndCompare' , AddAndCompare_ServiceinParameter , AddAndCompare_ServiceoutParameter , AddAndCompare_ServiceinStreamParameter , AddAndCompare_ServiceoutStreamParameter , 0 , 0 )
117 AddAndCompare = GraphEmbeddedComponentsCrash.CNode( AddAndCompare_Service )
118 AddAndCompare.SetName( 'AddAndCompare' )
119 AddAndCompare.SetAuthor( '' )
120 AddAndCompare.SetComment( 'Python function' )
121 AddAndCompare.Coords( 233 , 0 )
122 IAddAndCompareAdder = AddAndCompare.GetInPort( 'Adder' )
123 IAddAndComparex = AddAndCompare.GetInPort( 'x' )
124 IAddAndComparey = AddAndCompare.GetInPort( 'y' )
125 IAddAndCompareanOtherAdder = AddAndCompare.GetInPort( 'anOtherAdder' )
126 IAddAndCompareGate = AddAndCompare.GetInPort( 'Gate' )
127 OAddAndCompareFuncValue = AddAndCompare.GetOutPort( 'FuncValue' )
128 OAddAndComparez = AddAndCompare.GetOutPort( 'z' )
129 OAddAndCompareGate = AddAndCompare.GetOutPort( 'Gate' )
132 LAddFuncValueMulx = GraphEmbeddedComponentsCrash.Link( OAddFuncValue , IMulx )
134 LAddFuncValueAddAndComparex = GraphEmbeddedComponentsCrash.Link( OAddFuncValue , IAddAndComparex )
135 LAddFuncValueAddAndComparex.AddCoord( 1 , 195 , 108 )
136 LAddFuncValueAddAndComparex.AddCoord( 2 , 195 , 233 )
138 LAddzSubx = GraphEmbeddedComponentsCrash.Link( OAddz , ISubx )
139 LAddzSubx.AddCoord( 1 , 187 , 459 )
140 LAddzSubx.AddCoord( 2 , 186 , 262 )
142 LAddzAddAndComparey = GraphEmbeddedComponentsCrash.Link( OAddz , IAddAndComparey )
143 LAddzAddAndComparey.AddCoord( 1 , 187 , 139 )
144 LAddzAddAndComparey.AddCoord( 2 , 186 , 261 )
146 LSubzDivx = GraphEmbeddedComponentsCrash.Link( OSubz , IDivx )
147 LSubzDivx.AddCoord( 1 , 670 , 206 )
148 LSubzDivx.AddCoord( 2 , 680 , 447 )
150 LMulzDivy = GraphEmbeddedComponentsCrash.Link( OMulz , IDivy )
152 LAdditionAdderAddAndCompareAdder = GraphEmbeddedComponentsCrash.Link( OAdditionAdder , IAddAndCompareAdder )
154 LAddition_1AdderAddAndCompareanOtherAdder = GraphEmbeddedComponentsCrash.Link( OAddition_1Adder , IAddAndCompareanOtherAdder )
155 LAddition_1AdderAddAndCompareanOtherAdder.AddCoord( 1 , 215 , 168 )
156 LAddition_1AdderAddAndCompareanOtherAdder.AddCoord( 2 , 214 , 407 )
158 LAddAndCompareGateMulGate = GraphEmbeddedComponentsCrash.Link( OAddAndCompareGate , IMulGate )
160 LAddAndCompareGateSubGate = GraphEmbeddedComponentsCrash.Link( OAddAndCompareGate , ISubGate )
168 # Output Ports of the graph
169 #ODivz = Div.GetOutPort( 'z' )
170 #OAddAndCompareFuncValue = AddAndCompare.GetOutPort( 'FuncValue' )
171 #OAddAndComparez = AddAndCompare.GetOutPort( 'z' )
172 return GraphEmbeddedComponentsCrash
175 GraphEmbeddedComponentsCrash = DefGraphEmbeddedComponentsCrash()
177 GraphEmbeddedComponentsCrash.Run()
178 GraphEmbeddedComponentsCrash.DoneW()
179 GraphEmbeddedComponentsCrash.PrintPorts()