X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=examples%2FGraphEssai1.py;h=211679c982e0c80c3115af568b98c49c2426b333;hb=c76ba930bc0452f60ae0242648a852e2ea31b2a6;hp=4792e229b46ea1db5525e73bed9bcfed0b0fd045;hpb=f1203589661527b8d6d040f1075a4d7ffcae142d;p=modules%2Fsuperv.git diff --git a/examples/GraphEssai1.py b/examples/GraphEssai1.py index 4792e22..211679c 100755 --- a/examples/GraphEssai1.py +++ b/examples/GraphEssai1.py @@ -9,40 +9,53 @@ GraphEssai1.SetAuthor( '' ) GraphEssai1.SetComment( '' ) GraphEssai1.Coords( 0 , 0 ) -# Creation of Computing Nodes -Add = GraphEssai1.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +# Creation of Factory Nodes + +Add = GraphEssai1.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'localhost/FactoryServer' ) -Add.SetComment( '' ) -Add.Coords( 0 , 214 ) -Sub = GraphEssai1.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 16 , 262 ) + +Sub = GraphEssai1.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'localhost/FactoryServer' ) -Sub.SetComment( '' ) -Sub.Coords( 192 , 51 ) -Mul = GraphEssai1.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 219 , 54 ) + +Mul = GraphEssai1.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( '' ) -Mul.Coords( 420 , 265 ) -Div = GraphEssai1.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 419 , 262 ) + +Div = GraphEssai1.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'localhost/FactoryServer' ) -Div.SetComment( '' ) -Div.Coords( 623 , 141 ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 623 , 55 ) -# Creation of intermediate Output variables and of Computing Links +# Creation of Links Addz = Add.Port( 'z' ) Subx = GraphEssai1.Link( Addz , Sub.Port( 'x' ) ) +Subx.AddCoord( 1 , 193 , 135 ) +Subx.AddCoord( 2 , 193 , 372 ) + Subz = Sub.Port( 'z' ) -Mulx = GraphEssai1.Link( Subz , Mul.Port( 'x' ) ) Divx = GraphEssai1.Link( Subz , Div.Port( 'x' ) ) + +Mulx = GraphEssai1.Link( Subz , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 396 , 343 ) +Mulx.AddCoord( 2 , 397 , 136 ) + Mulz = Mul.Port( 'z' ) Divy = GraphEssai1.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 598 , 163 ) +Divy.AddCoord( 2 , 598 , 343 ) # Creation of Input datas Addx = Add.Input( 'x' , 3)