From: rahuel Date: Thu, 14 Apr 2005 11:25:37 +0000 (+0000) Subject: Change of dynamic loading from Visu to VISU X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0010ea8b4f92b5168c6258f15d956041a68cab0c;p=modules%2Fsuperv.git Change of dynamic loading from Visu to VISU --- diff --git a/examples/TestSupervMedfieldLoopFori.py b/examples/TestSupervMedfieldLoopFori.py index 70339b9..119c593 100755 --- a/examples/TestSupervMedfieldLoopFori.py +++ b/examples/TestSupervMedfieldLoopFori.py @@ -1,159 +1,185 @@ -# Generated python file of Graph LoopGraph +# Generated python file of Graph TestSupervMedfieldLoopFori from SuperV import * -# Graph creation -LoopGraph = Graph( 'LoopGraph' ) -LoopGraph.SetName( 'LoopGraph' ) -LoopGraph.SetAuthor( '' ) -LoopGraph.SetComment( '' ) -LoopGraph.Coords( 0 , 0 ) -# Creation of Factory Nodes - -Mul = LoopGraph.FNode( 'Calculator' , 'Calculator' , 'Mul' ) -Mul.SetName( 'Mul' ) -Mul.SetAuthor( 'LD' ) -Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( 'Multiply a field by a constant' ) -Mul.Coords( 429 , 46 ) - -# Creation of InLine Nodes -PyInitDisplay = [] -PyInitDisplay.append( 'from VISU import * ' ) -PyInitDisplay.append( 'import SALOMEDS ' ) -PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) -PyInitDisplay.append( 'from SALOME_NamingServicePy import * ' ) -PyInitDisplay.append( 'def InitDisplay(): ' ) -PyInitDisplay.append( ' # initialize the ORB ' ) -PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) -PyInitDisplay.append( ' # create an LifeCycleCORBA instance ' ) -PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) -PyInitDisplay.append( ' # ----------------------------------------- ' ) -PyInitDisplay.append( ' # Visualization parameters ' ) -PyInitDisplay.append( ' #create a naming service instance ' ) -PyInitDisplay.append( ' naming_service = SALOME_NamingServicePy_i(orb) ' ) -PyInitDisplay.append( ' # get Study Manager reference ' ) -PyInitDisplay.append( ' obj = naming_service.Resolve("myStudyManager") ' ) -PyInitDisplay.append( ' myStudyManager = obj._narrow(SALOMEDS.StudyManager) ' ) -PyInitDisplay.append( ' myStudy = myStudyManager.GetStudyByID(1) ' ) -PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer", "Visu") ' ) -PyInitDisplay.append( ' print "InitDisplay --> aVisu = ",aVisu ' ) -PyInitDisplay.append( ' aVisu.SetCurrentStudy(myStudy); ' ) -PyInitDisplay.append( ' aViewManager = aVisu.GetViewManager() ' ) -PyInitDisplay.append( ' print "InitDisplay --> aViewManager = ",aViewManager ' ) -PyInitDisplay.append( ' aView = aViewManager.Create3DView() ' ) -PyInitDisplay.append( ' print "InitDisplay --> aView = ",aView ' ) -PyInitDisplay.append( ' return aVisu,aView ' ) -InitDisplay = LoopGraph.INode( 'InitDisplay' , PyInitDisplay ) -InitDisplay.OutPort( 'aVisu' , 'objref' ) -InitDisplay.OutPort( 'aView' , 'objref' ) -InitDisplay.SetName( 'InitDisplay' ) -InitDisplay.SetAuthor( '' ) -InitDisplay.SetComment( 'Compute Node' ) -InitDisplay.Coords( 1 , 105 ) - -# Creation of Loop Nodes -PyInit = [] -PyInit.append( 'def Init(index,min,max,medfield,x1,aVisu,aView): ' ) -PyInit.append( ' if max >= min : ' ) -PyInit.append( ' index = min ' ) -PyInit.append( ' else : ' ) -PyInit.append( ' index = max ' ) -PyInit.append( ' print "Init --> index = ",index ' ) -PyInit.append( ' print " min = ",min ' ) -PyInit.append( ' print " max = ",max ' ) -PyInit.append( ' print " medfield = ",medfield ' ) -PyInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) -PyMoreInit = [] -PyMoreInit.append( 'def More(index,min,max,medfield,x1,aVisu,aView): ' ) -PyMoreInit.append( ' if max >= index : ' ) -PyMoreInit.append( ' DoLoop = 1 ' ) -PyMoreInit.append( ' else : ' ) -PyMoreInit.append( ' DoLoop = 0 ' ) -PyMoreInit.append( ' print "More --> DoLoop = ",DoLoop ' ) -PyMoreInit.append( ' print " index = ",index ' ) -PyMoreInit.append( ' print " min = ",min ' ) -PyMoreInit.append( ' print " max = ",max ' ) -PyMoreInit.append( ' print " medfield = ",medfield ' ) -PyMoreInit.append( ' return DoLoop,index,min,max,medfield,x1,aVisu,aView ' ) -PyNextInit = [] -PyNextInit.append( 'def Next(index,min,max,medfield,x1,aVisu,aView): ' ) -PyNextInit.append( ' index = index + 1 ' ) -PyNextInit.append( ' print "Next --> index = ",index ' ) -PyNextInit.append( ' print " min = ",min ' ) -PyNextInit.append( ' print " max = ",max ' ) -PyNextInit.append( ' print " medfield = ",medfield ' ) -PyNextInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) -Init,EndInit = LoopGraph.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) -EndInit.SetName( 'EndInit' ) -EndInit.SetAuthor( 'LD' ) -EndInit.SetComment( 'no comment' ) -EndInit.Coords( 631 , 5 ) -Init.InPort( 'index' , 'long' ) -Init.InPort( 'min' , 'long' ) -Init.InPort( 'max' , 'long' ) -Init.InPort( 'medfield' , 'objref' ) -Init.InPort( 'x1' , 'double' ) -Init.InPort( 'aVisu' , 'objref' ) -Init.InPort( 'aView' , 'objref' ) -Init.OutPort( 'index' , 'long' ) -Init.OutPort( 'min' , 'long' ) -Init.OutPort( 'max' , 'long' ) -Init.OutPort( 'medfield' , 'objref' ) -Init.OutPort( 'x1' , 'double' ) -Init.OutPort( 'aVisu' , 'objref' ) -Init.OutPort( 'aView' , 'objref' ) -Init.SetName( 'Init' ) -Init.SetAuthor( 'LD' ) -Init.SetComment( 'no comment' ) -Init.Coords( 216 , 5 ) - -# Creation of Links -InitDisplayaVisu = InitDisplay.Port( 'aVisu' ) -InitaVisu = LoopGraph.Link( InitDisplayaVisu , Init.Port( 'aVisu' ) ) - -InitDisplayaView = InitDisplay.Port( 'aView' ) -InitaView = LoopGraph.Link( InitDisplayaView , Init.Port( 'aView' ) ) - -Initindex = Init.Port( 'index' ) -EndInitindex = LoopGraph.Link( Initindex , EndInit.Port( 'index' ) ) - -Initmin = Init.Port( 'min' ) -EndInitmin = LoopGraph.Link( Initmin , EndInit.Port( 'min' ) ) - -Initmax = Init.Port( 'max' ) -EndInitmax = LoopGraph.Link( Initmax , EndInit.Port( 'max' ) ) - -Initmedfield = Init.Port( 'medfield' ) -Mulfield1 = LoopGraph.Link( Initmedfield , Mul.Port( 'field1' ) ) - -Initx1 = Init.Port( 'x1' ) -EndInitx1 = LoopGraph.Link( Initx1 , EndInit.Port( 'x1' ) ) - -Mulx1 = LoopGraph.Link( Initx1 , Mul.Port( 'x1' ) ) - -InitaVisu = Init.Port( 'aVisu' ) -EndInitaVisu = LoopGraph.Link( InitaVisu , EndInit.Port( 'aVisu' ) ) - -InitaView = Init.Port( 'aView' ) -EndInitaView = LoopGraph.Link( InitaView , EndInit.Port( 'aView' ) ) - -Mulreturn = Mul.Port( 'return' ) -EndInitmedfield = LoopGraph.Link( Mulreturn , EndInit.Port( 'medfield' ) ) - -# Creation of Input datas -Initindex = Init.Input( 'index' , 0) -Initmin = Init.Input( 'min' , 0) -Initmax = Init.Input( 'max' , 55) -Initmedfield = Init.Input( 'medfield' , 'IOR:010000001f00000049444c3a53414c4f4d455f4d45442f4649454c44444f55424c453a312e300000010000000000000026000000010100000a0000003132372e302e302e3100ead00e000000fe1948673f000058e60000000021') -Initx1 = Init.Input( 'x1' , 2) - -# Creation of Output variables -EndInitindex = EndInit.Port( 'index' ) -EndInitmin = EndInit.Port( 'min' ) -EndInitmax = EndInit.Port( 'max' ) -EndInitmedfield = EndInit.Port( 'medfield' ) -EndInitx1 = EndInit.Port( 'x1' ) -EndInitaVisu = EndInit.Port( 'aVisu' ) -EndInitaView = EndInit.Port( 'aView' ) +# Graph creation of TestSupervMedfieldLoopFori +def DefTestSupervMedfieldLoopFori() : + TestSupervMedfieldLoopFori = Graph( 'TestSupervMedfieldLoopFori' ) + TestSupervMedfieldLoopFori.SetName( 'TestSupervMedfieldLoopFori' ) + TestSupervMedfieldLoopFori.SetAuthor( '' ) + TestSupervMedfieldLoopFori.SetComment( '' ) + TestSupervMedfieldLoopFori.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Mul = TestSupervMedfieldLoopFori.FNode( 'Calculator' , 'Calculator' , 'Mul' ) + Mul.SetName( 'Mul' ) + Mul.SetAuthor( 'LD' ) + Mul.SetContainer( 'localhost/FactoryServer' ) + Mul.SetComment( 'Multiply a field by a constant' ) + Mul.Coords( 429 , 46 ) + IMulfield1 = Mul.GetInPort( 'field1' ) + IMulx1 = Mul.GetInPort( 'x1' ) + IMulGate = Mul.GetInPort( 'Gate' ) + OMulreturn = Mul.GetOutPort( 'return' ) + OMulGate = Mul.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PyInitDisplay = [] + PyInitDisplay.append( 'from VISU import * ' ) + PyInitDisplay.append( 'import SALOMEDS ' ) + PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) + PyInitDisplay.append( 'from SALOME_NamingServicePy import * ' ) + PyInitDisplay.append( 'def InitDisplay(): ' ) + PyInitDisplay.append( ' # initialize the ORB ' ) + PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) + PyInitDisplay.append( ' # create an LifeCycleCORBA instance ' ) + PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) + PyInitDisplay.append( ' # ----------------------------------------- ' ) + PyInitDisplay.append( ' # Visualization parameters ' ) + PyInitDisplay.append( ' #create a naming service instance ' ) + PyInitDisplay.append( ' naming_service = SALOME_NamingServicePy_i(orb) ' ) + PyInitDisplay.append( ' # get Study Manager reference ' ) + PyInitDisplay.append( ' obj = naming_service.Resolve("myStudyManager") ' ) + PyInitDisplay.append( ' myStudyManager = obj._narrow(SALOMEDS.StudyManager) ' ) + PyInitDisplay.append( ' myStudy = myStudyManager.GetStudyByID(1) ' ) + PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer", "VISU") ' ) + PyInitDisplay.append( ' print "InitDisplay --> aVisu = ",aVisu ' ) + PyInitDisplay.append( ' aVisu.SetCurrentStudy(myStudy); ' ) + PyInitDisplay.append( ' aViewManager = aVisu.GetViewManager() ' ) + PyInitDisplay.append( ' print "InitDisplay --> aViewManager = ",aViewManager ' ) + PyInitDisplay.append( ' aView = aViewManager.Create3DView() ' ) + PyInitDisplay.append( ' print "InitDisplay --> aView = ",aView ' ) + PyInitDisplay.append( ' return aVisu,aView ' ) + InitDisplay = TestSupervMedfieldLoopFori.INode( 'InitDisplay' , PyInitDisplay ) + InitDisplay.SetName( 'InitDisplay' ) + InitDisplay.SetAuthor( '' ) + InitDisplay.SetComment( 'Compute Node' ) + InitDisplay.Coords( 1 , 105 ) + IInitDisplayGate = InitDisplay.GetInPort( 'Gate' ) + OInitDisplayaVisu = InitDisplay.OutPort( 'aVisu' , 'objref' ) + OInitDisplayaView = InitDisplay.OutPort( 'aView' , 'objref' ) + OInitDisplayGate = InitDisplay.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInit = [] + PyInit.append( 'def Init(index,min,max,medfield,x1,aVisu,aView): ' ) + PyInit.append( ' if max >= min : ' ) + PyInit.append( ' index = min ' ) + PyInit.append( ' else : ' ) + PyInit.append( ' index = max ' ) + PyInit.append( ' print "Init --> index = ",index ' ) + PyInit.append( ' print " min = ",min ' ) + PyInit.append( ' print " max = ",max ' ) + PyInit.append( ' print " medfield = ",medfield ' ) + PyInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) + PyMoreInit = [] + PyMoreInit.append( 'def More(index,min,max,medfield,x1,aVisu,aView): ' ) + PyMoreInit.append( ' if max >= index : ' ) + PyMoreInit.append( ' DoLoop = 1 ' ) + PyMoreInit.append( ' else : ' ) + PyMoreInit.append( ' DoLoop = 0 ' ) + PyMoreInit.append( ' print "More --> DoLoop = ",DoLoop ' ) + PyMoreInit.append( ' print " index = ",index ' ) + PyMoreInit.append( ' print " min = ",min ' ) + PyMoreInit.append( ' print " max = ",max ' ) + PyMoreInit.append( ' print " medfield = ",medfield ' ) + PyMoreInit.append( ' return DoLoop,index,min,max,medfield,x1,aVisu,aView ' ) + PyNextInit = [] + PyNextInit.append( 'def Next(index,min,max,medfield,x1,aVisu,aView): ' ) + PyNextInit.append( ' index = index + 1 ' ) + PyNextInit.append( ' print "Next --> index = ",index ' ) + PyNextInit.append( ' print " min = ",min ' ) + PyNextInit.append( ' print " max = ",max ' ) + PyNextInit.append( ' print " medfield = ",medfield ' ) + PyNextInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) + Init,EndInit = TestSupervMedfieldLoopFori.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + EndInit.SetName( 'EndInit' ) + EndInit.SetAuthor( 'LD' ) + EndInit.SetComment( 'no comment' ) + EndInit.Coords( 631 , 5 ) + PyEndInit = [] + EndInit.SetPyFunction( '' , PyEndInit ) + IInitDoLoop = Init.GetInPort( 'DoLoop' ) + IInitindex = Init.InPort( 'index' , 'long' ) + IInitmin = Init.InPort( 'min' , 'long' ) + IInitmax = Init.InPort( 'max' , 'long' ) + IInitmedfield = Init.InPort( 'medfield' , 'objref' ) + IInitx1 = Init.InPort( 'x1' , 'double' ) + IInitaVisu = Init.InPort( 'aVisu' , 'objref' ) + IInitaView = Init.InPort( 'aView' , 'objref' ) + IInitGate = Init.GetInPort( 'Gate' ) + OInitDoLoop = Init.GetOutPort( 'DoLoop' ) + OInitindex = Init.GetOutPort( 'index' ) + OInitmin = Init.GetOutPort( 'min' ) + OInitmax = Init.GetOutPort( 'max' ) + OInitmedfield = Init.GetOutPort( 'medfield' ) + OInitx1 = Init.GetOutPort( 'x1' ) + OInitaVisu = Init.GetOutPort( 'aVisu' ) + OInitaView = Init.GetOutPort( 'aView' ) + IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' ) + IEndInitindex = EndInit.GetInPort( 'index' ) + IEndInitmin = EndInit.GetInPort( 'min' ) + IEndInitmax = EndInit.GetInPort( 'max' ) + IEndInitmedfield = EndInit.GetInPort( 'medfield' ) + IEndInitx1 = EndInit.GetInPort( 'x1' ) + IEndInitaVisu = EndInit.GetInPort( 'aVisu' ) + IEndInitaView = EndInit.GetInPort( 'aView' ) + IEndInitGate = EndInit.GetInPort( 'Gate' ) + OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' ) + OEndInitindex = EndInit.GetOutPort( 'index' ) + OEndInitmin = EndInit.GetOutPort( 'min' ) + OEndInitmax = EndInit.GetOutPort( 'max' ) + OEndInitmedfield = EndInit.GetOutPort( 'medfield' ) + OEndInitx1 = EndInit.GetOutPort( 'x1' ) + OEndInitaVisu = EndInit.GetOutPort( 'aVisu' ) + OEndInitaView = EndInit.GetOutPort( 'aView' ) + OEndInitGate = EndInit.GetOutPort( 'Gate' ) + Init.SetName( 'Init' ) + Init.SetAuthor( 'LD' ) + Init.SetComment( 'no comment' ) + Init.Coords( 216 , 5 ) + + # Creation of Links + LInitDisplayaVisuInitaVisu = TestSupervMedfieldLoopFori.Link( OInitDisplayaVisu , IInitaVisu ) + + LInitDisplayaViewInitaView = TestSupervMedfieldLoopFori.Link( OInitDisplayaView , IInitaView ) + + LInitindexEndInitindex = TestSupervMedfieldLoopFori.Link( OInitindex , IEndInitindex ) + + LInitminEndInitmin = TestSupervMedfieldLoopFori.Link( OInitmin , IEndInitmin ) + + LInitmaxEndInitmax = TestSupervMedfieldLoopFori.Link( OInitmax , IEndInitmax ) + + LInitmedfieldMulfield1 = TestSupervMedfieldLoopFori.Link( OInitmedfield , IMulfield1 ) + + LInitx1EndInitx1 = TestSupervMedfieldLoopFori.Link( OInitx1 , IEndInitx1 ) + + LInitx1Mulx1 = TestSupervMedfieldLoopFori.Link( OInitx1 , IMulx1 ) + + LInitaVisuEndInitaVisu = TestSupervMedfieldLoopFori.Link( OInitaVisu , IEndInitaVisu ) + + LInitaViewEndInitaView = TestSupervMedfieldLoopFori.Link( OInitaView , IEndInitaView ) + + LMulreturnEndInitmedfield = TestSupervMedfieldLoopFori.Link( OMulreturn , IEndInitmedfield ) + + # Input datas + IInitindex.Input( 0 ) + IInitmin.Input( 0 ) + IInitmax.Input( 55 ) + IInitmedfield.Input( 'IOR:010000001f00000049444c3a53414c4f4d455f4d45442f4649454c44444f55424c453a312e300000010000000000000026000000010100000a0000003132372e302e302e3100ead00e000000fe1948673f000058e60000000021' ) + IInitx1.Input( 2 ) + + # Output Ports of the graph + #OEndInitindex = EndInit.GetOutPort( 'index' ) + #OEndInitmin = EndInit.GetOutPort( 'min' ) + #OEndInitmax = EndInit.GetOutPort( 'max' ) + #OEndInitmedfield = EndInit.GetOutPort( 'medfield' ) + #OEndInitx1 = EndInit.GetOutPort( 'x1' ) + #OEndInitaVisu = EndInit.GetOutPort( 'aVisu' ) + #OEndInitaView = EndInit.GetOutPort( 'aView' ) + return TestSupervMedfieldLoopFori + + +TestSupervMedfieldLoopFori = DefTestSupervMedfieldLoopFori() diff --git a/examples/TestSupervMedfieldLoopFori.xml b/examples/TestSupervMedfieldLoopFori.xml index 0d10269..5edb47a 100755 --- a/examples/TestSupervMedfieldLoopFori.xml +++ b/examples/TestSupervMedfieldLoopFori.xml @@ -1,438 +1,441 @@ - + + ? - ? - LoopGraph - 1 - ? - + ? + TestSupervMedfieldLoopFori + 1 + ? + LoopGraph - + long - Init\index - + Init__index + long - Init\min - + Init__min + long - Init\max - + Init__max + objref - Init\medfield - + Init__medfield + double - Init\x1 - + Init__x1 + long - EndInit\index - + EndInit__index + long - EndInit\min - + EndInit__min + long - EndInit\max - + EndInit__max + objref - EndInit\medfield - + EndInit__medfield + double - EndInit\x1 - + EndInit__x1 + objref - EndInit\aVisu - + EndInit__aVisu + objref - EndInit\aView - - - 15/9/2003 - 15:25:24 - 19/9/2003 - 16:0:10 - 1.04 - ? - ? - ? - 0 - 0 - + EndInit__aView + + + 15/9/2003 - 15:25:24 + 8/4/2005 - 13:44:4 + 1.04 + ? + ? + ? + 0 + 0 + ? - ? - InitDisplay - 3 - ? - + ? + InitDisplay + 3 + ? + InitDisplay - - + + objref - aVisu - + aVisu + objref - aView - - + aView + + InitDisplay - - - - - - - - - - - - - - - - - - - aVisu = ",aVisu ]]> - - - aViewManager = ",aViewManager ]]> - - aView = ",aView ]]> - - 19/9/2003 - 16:0:9 - 19/9/2003 - 16:0:9 - 1.04 - ? - ? - Compute Node - 1 - 105 - + + + + + + + + + + + + + + + + + + + aVisu = ",aVisu ]]> + + + aViewManager = ",aViewManager ]]> + + aView = ",aView ]]> + + 8/4/2005 - 13:44:4 + 8/4/2005 - 13:44:4 + 1.04 + ? + ? + Compute Node + 1 + 105 + ? - ? - Init - 4 - EndInit - + ? + Init + 4 + EndInit + Init - + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - + aView + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - - + aView + + Init - - = min : ]]> - - - - index = ",index ]]> - - - - - + + = min : ]]> + + + + index = ",index ]]> + + + + + More - - = index : ]]> - - - - DoLoop = ",DoLoop ]]> - - - - - - + + = index : ]]> + + + + DoLoop = ",DoLoop ]]> + + + + + + Next - - - index = ",index ]]> - - - - - 19/9/2003 - 16:0:9 - 19/9/2003 - 16:0:9 - 1.04 - LD - ? - no comment - 216 - 5 - + + + index = ",index ]]> + + + + + 8/4/2005 - 13:44:4 + 8/4/2005 - 13:44:4 + 1.04 + LD + ? + no comment + 216 + 5 + ? - ? - EndInit - 5 - Init - + ? + EndInit + 5 + Init + EndInit - + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - + aView + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - - - - 19/9/2003 - 16:0:9 - 19/9/2003 - 16:0:9 - 1.04 - LD - ? - no comment - 631 - 5 - + aView + + + +? + + 8/4/2005 - 13:44:4 + 8/4/2005 - 13:44:4 + 1.04 + LD + ? + no comment + 631 + 5 + Calculator - Calculator - Mul - 0 - ? - + Calculator + Mul + 0 + ? + Mul - + FIELDDOUBLE - field1 - + field1 + double - x1 - + x1 + FIELDDOUBLE - return - - - 19/9/2003 - 16:0:10 - 19/9/2003 - 16:0:10 - 1.04 - LD - localhost/FactoryServer - Multiply a field by a constant - 429 - 46 - + return + + + 8/4/2005 - 13:44:4 + 8/4/2005 - 13:44:4 + 1.04 + LD + localhost/FactoryServer + Multiply a field by a constant + 429 + 46 + InitDisplay - aVisu - Init - aVisu - - + aVisu + Init + aVisu + + InitDisplay - aView - Init - aView - - + aView + Init + aView + + Init - DoLoop - EndInit - DoLoop - - + DoLoop + EndInit + DoLoop + + Init - index - EndInit - index - - + index + EndInit + index + + Init - min - EndInit - min - - + min + EndInit + min + + Init - max - EndInit - max - - + max + EndInit + max + + Init - medfield - Mul - field1 - - + medfield + Mul + field1 + + Init - x1 - EndInit - x1 - - + x1 + EndInit + x1 + + Init - x1 - Mul - x1 - - + x1 + Mul + x1 + + Init - aVisu - EndInit - aVisu - - + aVisu + EndInit + aVisu + + Init - aView - EndInit - aView - - + aView + EndInit + aView + + EndInit - DoLoop - Init - DoLoop - + DoLoop + Init + DoLoop + 205 - 98 - + 98 + 204 - 21 - + 21 + 936 - 20 - + 20 + 935 - 70 - + 70 + Mul - return - EndInit - medfield - - + return + EndInit + medfield + + -LoopGraph - Init\index - Init - index - +TestSupervMedfieldLoopFori + Init__index + Init + index + 3 - 0 - - -LoopGraph - Init\min - Init - min - + 0 + + +TestSupervMedfieldLoopFori + Init__min + Init + min + 3 - 0 - - -LoopGraph - Init\max - Init - max - + 0 + + +TestSupervMedfieldLoopFori + Init__max + Init + max + 3 - 55 - - -LoopGraph - Init\medfield - Init - medfield - + 55 + + +TestSupervMedfieldLoopFori + Init__medfield + Init + medfield + 14 - IOR:010000001f00000049444c3a53414c4f4d455f4d45442f4649454c44444f55424c453a312e300000010000000000000026000000010100000a0000003132372e302e302e3100ead00e000000fe1948673f000058e60000000021 - - -LoopGraph - Init\x1 - Init - x1 - + IOR:010000001f00000049444c3a53414c4f4d455f4d45442f4649454c44444f55424c453a312e300000010000000000000026000000010100000a0000003132372e302e302e3100ead00e000000fe1948673f000058e60000000021 + + +TestSupervMedfieldLoopFori + Init__x1 + Init + x1 + 7 - 2 - + 2 + diff --git a/examples/TestSupervMedfieldLoopForiVisu.py b/examples/TestSupervMedfieldLoopForiVisu.py index 2eff10b..6841ea9 100755 --- a/examples/TestSupervMedfieldLoopForiVisu.py +++ b/examples/TestSupervMedfieldLoopForiVisu.py @@ -1,216 +1,243 @@ -# Generated python file of Graph LoopGraph +# Generated python file of Graph TestSupervMedfieldLoopForiVisu from SuperV import * -# Graph creation -LoopGraph = Graph( 'LoopGraph' ) -LoopGraph.SetName( 'LoopGraph' ) -LoopGraph.SetAuthor( '' ) -LoopGraph.SetComment( '' ) -LoopGraph.Coords( 0 , 0 ) -# Creation of Factory Nodes - -Mul = LoopGraph.FNode( 'Calculator' , 'Calculator' , 'Mul' ) -Mul.SetName( 'Mul' ) -Mul.SetAuthor( 'LD' ) -Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( 'Multiply a field by a constant' ) -Mul.Coords( 387 , 104 ) - -# Creation of InLine Nodes -PyInitDisplay = [] -PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) -PyInitDisplay.append( 'from VISU import * ' ) -PyInitDisplay.append( 'def InitDisplay(): ' ) -PyInitDisplay.append( ' # initialize the ORB ' ) -PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) -PyInitDisplay.append( ' # create an LifeCycleCORBA instance ' ) -PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) -PyInitDisplay.append( ' # ----------------------------------------- ' ) -PyInitDisplay.append( ' # loading visu component ' ) -PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer","Visu") ' ) -PyInitDisplay.append( ' print "InitDisplay --> aVisu = ",aVisu ' ) -PyInitDisplay.append( ' aViewManager = aVisu.GetViewManager() ' ) -PyInitDisplay.append( ' print "InitDisplay --> aViewManager = ",aViewManager ' ) -PyInitDisplay.append( ' # aView = aViewManager.GetCurrentView() ' ) -PyInitDisplay.append( ' aView = aViewManager.Create3DView() ' ) -PyInitDisplay.append( ' print "InitDisplay --> aView = ",aView ' ) -PyInitDisplay.append( ' return aVisu,aView ' ) -InitDisplay = LoopGraph.INode( 'InitDisplay' , PyInitDisplay ) -InitDisplay.OutPort( 'aVisu' , 'objref' ) -InitDisplay.OutPort( 'aView' , 'objref' ) -InitDisplay.SetName( 'InitDisplay' ) -InitDisplay.SetAuthor( '' ) -InitDisplay.SetComment( 'Compute Node' ) -InitDisplay.Coords( 0 , 163 ) - -PyDisplayMed = [] -PyDisplayMed.append( 'import os ' ) -PyDisplayMed.append( 'import SALOME_MED ' ) -PyDisplayMed.append( 'from VISU import * ' ) -PyDisplayMed.append( 'from LifeCycleCORBA import * ' ) -PyDisplayMed.append( 'def DisplayMed(medfield,index,aVisu,aView): ' ) -PyDisplayMed.append( ' # initialize the ORB ' ) -PyDisplayMed.append( ' orb = CORBA.ORB_init([''], CORBA.ORB_ID) ' ) -PyDisplayMed.append( ' # create an LifeCycleCORBA instance ' ) -PyDisplayMed.append( ' lcc = LifeCycleCORBA(orb) ' ) -PyDisplayMed.append( ' print " " ' ) -PyDisplayMed.append( ' print "***************************************************************" ' ) -PyDisplayMed.append( ' calc = lcc.FindOrLoadComponent("FactoryServer", "Calculator") ' ) -PyDisplayMed.append( ' print "-----> calc = ",calc ' ) -PyDisplayMed.append( ' medfilename = "/tmp/LoopGraphFile" + str(index) + ".med" ' ) -PyDisplayMed.append( ' print "-----> Writing Med field in temporary file : ",medfilename ' ) -PyDisplayMed.append( ' calc.writeMEDfile(medfield,medfilename) ' ) -PyDisplayMed.append( ' print "-----> calc = ",calc ' ) -PyDisplayMed.append( ' print "***************************************************************" ' ) -PyDisplayMed.append( ' myResult1 = aVisu.ImportFile(medfilename) ' ) -PyDisplayMed.append( ' print "-----> myResult1 = ",myResult1 ' ) -PyDisplayMed.append( ' field_name = medfield.getName() ' ) -PyDisplayMed.append( ' print "-----> field_name = ",field_name ' ) -PyDisplayMed.append( ' mesh_name = medfield.getSupport().getMesh().getName() ' ) -PyDisplayMed.append( ' print "-----> mesh_name = ",mesh_name ' ) -PyDisplayMed.append( ' aMesh1 = aVisu.MeshOnEntity(myResult1,mesh_name,CELL) ' ) -PyDisplayMed.append( ' print "-----> aMesh1 = ",aMesh1 ' ) -PyDisplayMed.append( ' aScalarMap1 = aVisu.ScalarMapOnField(myResult1,mesh_name,NODE,field_name,1) ' ) -PyDisplayMed.append( ' print "-----> aScalarMap1 = ",aScalarMap1 ' ) -PyDisplayMed.append( ' aView.DisplayOnly(aScalarMap1) ' ) -PyDisplayMed.append( ' aView.FitAll() ' ) -PyDisplayMed.append( ' command = "rm " + medfilename ' ) -PyDisplayMed.append( ' os.system(command) ' ) -PyDisplayMed.append( ' print "-----> Delete temporary Med file : ",medfilename ' ) -PyDisplayMed.append( ' print "***************************************************************" ' ) -PyDisplayMed.append( ' print " " ' ) -PyDisplayMed.append( ' return medfield ' ) -DisplayMed = LoopGraph.INode( 'DisplayMed' , PyDisplayMed ) -DisplayMed.InPort( 'INmedfield' , 'objref' ) -DisplayMed.InPort( 'index' , 'long' ) -DisplayMed.InPort( 'aVisu' , 'objref' ) -DisplayMed.InPort( 'aView' , 'objref' ) -DisplayMed.OutPort( 'OUTmedfield' , 'objref' ) -DisplayMed.SetName( 'DisplayMed' ) -DisplayMed.SetAuthor( '' ) -DisplayMed.SetComment( 'Compute Node' ) -DisplayMed.Coords( 594 , 105 ) - -# Creation of Loop Nodes -PyInit = [] -PyInit.append( 'def Init(index,min,max,medfield,x1,aVisu,aView): ' ) -PyInit.append( ' if max >= min : ' ) -PyInit.append( ' index = min ' ) -PyInit.append( ' else : ' ) -PyInit.append( ' index = max ' ) -PyInit.append( ' print "Init --> index = ",index ' ) -PyInit.append( ' print " min = ",min ' ) -PyInit.append( ' print " max = ",max ' ) -PyInit.append( ' print " medfield = ",medfield ' ) -PyInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) -PyMoreInit = [] -PyMoreInit.append( 'def More(index,min,max,medfield,x1,aVisu,aView): ' ) -PyMoreInit.append( ' if max >= index : ' ) -PyMoreInit.append( ' DoLoop = 1 ' ) -PyMoreInit.append( ' else : ' ) -PyMoreInit.append( ' DoLoop = 0 ' ) -PyMoreInit.append( ' print "More --> DoLoop = ",DoLoop ' ) -PyMoreInit.append( ' print " index = ",index ' ) -PyMoreInit.append( ' print " min = ",min ' ) -PyMoreInit.append( ' print " max = ",max ' ) -PyMoreInit.append( ' print " medfield = ",medfield ' ) -PyMoreInit.append( ' return DoLoop,index,min,max,medfield,x1,aVisu,aView ' ) -PyNextInit = [] -PyNextInit.append( 'def Next(index,min,max,medfield,x1,aVisu,aView): ' ) -PyNextInit.append( ' index = index + 1 ' ) -PyNextInit.append( ' print "Next --> index = ",index ' ) -PyNextInit.append( ' print " min = ",min ' ) -PyNextInit.append( ' print " max = ",max ' ) -PyNextInit.append( ' print " medfield = ",medfield ' ) -PyNextInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) -Init,EndInit = LoopGraph.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) -EndInit.SetName( 'EndInit' ) -EndInit.SetAuthor( 'LD' ) -EndInit.SetComment( 'no comment' ) -EndInit.Coords( 776 , 64 ) -Init.InPort( 'index' , 'long' ) -Init.InPort( 'min' , 'long' ) -Init.InPort( 'max' , 'long' ) -Init.InPort( 'medfield' , 'objref' ) -Init.InPort( 'x1' , 'double' ) -Init.InPort( 'aVisu' , 'objref' ) -Init.InPort( 'aView' , 'objref' ) -Init.OutPort( 'index' , 'long' ) -Init.OutPort( 'min' , 'long' ) -Init.OutPort( 'max' , 'long' ) -Init.OutPort( 'medfield' , 'objref' ) -Init.OutPort( 'x1' , 'double' ) -Init.OutPort( 'aVisu' , 'objref' ) -Init.OutPort( 'aView' , 'objref' ) -Init.SetName( 'Init' ) -Init.SetAuthor( 'LD' ) -Init.SetComment( 'no comment' ) -Init.Coords( 205 , 63 ) - -# Creation of Links -InitDisplayaVisu = InitDisplay.Port( 'aVisu' ) -InitaVisu = LoopGraph.Link( InitDisplayaVisu , Init.Port( 'aVisu' ) ) - -InitDisplayaView = InitDisplay.Port( 'aView' ) -InitaView = LoopGraph.Link( InitDisplayaView , Init.Port( 'aView' ) ) - -Initindex = Init.Port( 'index' ) -EndInitindex = LoopGraph.Link( Initindex , EndInit.Port( 'index' ) ) - -DisplayMedindex = LoopGraph.Link( Initindex , DisplayMed.Port( 'index' ) ) -DisplayMedindex.AddCoord( 1 , 566 , 215 ) -DisplayMedindex.AddCoord( 2 , 566 , 96 ) - -Initmin = Init.Port( 'min' ) -EndInitmin = LoopGraph.Link( Initmin , EndInit.Port( 'min' ) ) - -Initmax = Init.Port( 'max' ) -EndInitmax = LoopGraph.Link( Initmax , EndInit.Port( 'max' ) ) - -Initmedfield = Init.Port( 'medfield' ) -Mulfield1 = LoopGraph.Link( Initmedfield , Mul.Port( 'field1' ) ) - -Initx1 = Init.Port( 'x1' ) -EndInitx1 = LoopGraph.Link( Initx1 , EndInit.Port( 'x1' ) ) - -Mulx1 = LoopGraph.Link( Initx1 , Mul.Port( 'x1' ) ) - -InitaVisu = Init.Port( 'aVisu' ) -EndInitaVisu = LoopGraph.Link( InitaVisu , EndInit.Port( 'aVisu' ) ) - -DisplayMedaVisu = LoopGraph.Link( InitaVisu , DisplayMed.Port( 'aVisu' ) ) -DisplayMedaVisu.AddCoord( 1 , 570 , 242 ) -DisplayMedaVisu.AddCoord( 2 , 569 , 263 ) -DisplayMedaVisu.AddCoord( 3 , 377 , 264 ) -DisplayMedaVisu.AddCoord( 4 , 376 , 242 ) - -InitaView = Init.Port( 'aView' ) -EndInitaView = LoopGraph.Link( InitaView , EndInit.Port( 'aView' ) ) - -DisplayMedaView = LoopGraph.Link( InitaView , DisplayMed.Port( 'aView' ) ) - -Mulreturn = Mul.Port( 'return' ) -DisplayMedINmedfield = LoopGraph.Link( Mulreturn , DisplayMed.Port( 'INmedfield' ) ) - -DisplayMedOUTmedfield = DisplayMed.Port( 'OUTmedfield' ) -EndInitmedfield = LoopGraph.Link( DisplayMedOUTmedfield , EndInit.Port( 'medfield' ) ) - -# Creation of Input datas -Initindex = Init.Input( 'index' , 0) -Initmin = Init.Input( 'min' , 0) -Initmax = Init.Input( 'max' , 4) -Initx1 = Init.Input( 'x1' , 2) - -# Missing Input datas -Initmedfield = Init.Port( 'medfield' ) - -# Creation of Output variables -EndInitindex = EndInit.Port( 'index' ) -EndInitmin = EndInit.Port( 'min' ) -EndInitmax = EndInit.Port( 'max' ) -EndInitmedfield = EndInit.Port( 'medfield' ) -EndInitx1 = EndInit.Port( 'x1' ) -EndInitaVisu = EndInit.Port( 'aVisu' ) -EndInitaView = EndInit.Port( 'aView' ) +# Graph creation of TestSupervMedfieldLoopForiVisu +def DefTestSupervMedfieldLoopForiVisu() : + TestSupervMedfieldLoopForiVisu = Graph( 'TestSupervMedfieldLoopForiVisu' ) + TestSupervMedfieldLoopForiVisu.SetName( 'TestSupervMedfieldLoopForiVisu' ) + TestSupervMedfieldLoopForiVisu.SetAuthor( '' ) + TestSupervMedfieldLoopForiVisu.SetComment( '' ) + TestSupervMedfieldLoopForiVisu.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + Mul = TestSupervMedfieldLoopForiVisu.FNode( 'Calculator' , 'Calculator' , 'Mul' ) + Mul.SetName( 'Mul' ) + Mul.SetAuthor( 'LD' ) + Mul.SetContainer( 'localhost/FactoryServer' ) + Mul.SetComment( 'Multiply a field by a constant' ) + Mul.Coords( 387 , 104 ) + IMulfield1 = Mul.GetInPort( 'field1' ) + IMulx1 = Mul.GetInPort( 'x1' ) + IMulGate = Mul.GetInPort( 'Gate' ) + OMulreturn = Mul.GetOutPort( 'return' ) + OMulGate = Mul.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PyInitDisplay = [] + PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) + PyInitDisplay.append( 'from VISU import * ' ) + PyInitDisplay.append( 'def InitDisplay(): ' ) + PyInitDisplay.append( ' # initialize the ORB ' ) + PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) + PyInitDisplay.append( ' # create an LifeCycleCORBA instance ' ) + PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) + PyInitDisplay.append( ' # ----------------------------------------- ' ) + PyInitDisplay.append( ' # loading visu component ' ) + PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer","VISU") ' ) + PyInitDisplay.append( ' print "InitDisplay --> aVisu = ",aVisu ' ) + PyInitDisplay.append( ' aViewManager = aVisu.GetViewManager() ' ) + PyInitDisplay.append( ' print "InitDisplay --> aViewManager = ",aViewManager ' ) + PyInitDisplay.append( ' # aView = aViewManager.GetCurrentView() ' ) + PyInitDisplay.append( ' aView = aViewManager.Create3DView() ' ) + PyInitDisplay.append( ' print "InitDisplay --> aView = ",aView ' ) + PyInitDisplay.append( ' return aVisu,aView ' ) + InitDisplay = TestSupervMedfieldLoopForiVisu.INode( 'InitDisplay' , PyInitDisplay ) + InitDisplay.SetName( 'InitDisplay' ) + InitDisplay.SetAuthor( '' ) + InitDisplay.SetComment( 'Compute Node' ) + InitDisplay.Coords( 0 , 163 ) + IInitDisplayGate = InitDisplay.GetInPort( 'Gate' ) + OInitDisplayaVisu = InitDisplay.OutPort( 'aVisu' , 'objref' ) + OInitDisplayaView = InitDisplay.OutPort( 'aView' , 'objref' ) + OInitDisplayGate = InitDisplay.GetOutPort( 'Gate' ) + + PyDisplayMed = [] + PyDisplayMed.append( 'import os ' ) + PyDisplayMed.append( 'import SALOME_MED ' ) + PyDisplayMed.append( 'from VISU import * ' ) + PyDisplayMed.append( 'from LifeCycleCORBA import * ' ) + PyDisplayMed.append( 'def DisplayMed(medfield,index,aVisu,aView): ' ) + PyDisplayMed.append( ' # initialize the ORB ' ) + PyDisplayMed.append( ' orb = CORBA.ORB_init([''], CORBA.ORB_ID) ' ) + PyDisplayMed.append( ' # create an LifeCycleCORBA instance ' ) + PyDisplayMed.append( ' lcc = LifeCycleCORBA(orb) ' ) + PyDisplayMed.append( ' print " " ' ) + PyDisplayMed.append( ' print "***************************************************************" ' ) + PyDisplayMed.append( ' calc = lcc.FindOrLoadComponent("FactoryServer", "Calculator") ' ) + PyDisplayMed.append( ' print "-----> calc = ",calc ' ) + PyDisplayMed.append( ' medfilename = "/tmp/LoopGraphFile" + str(index) + ".med" ' ) + PyDisplayMed.append( ' print "-----> Writing Med field in temporary file : ",medfilename ' ) + PyDisplayMed.append( ' calc.writeMEDfile(medfield,medfilename) ' ) + PyDisplayMed.append( ' print "-----> calc = ",calc ' ) + PyDisplayMed.append( ' print "***************************************************************" ' ) + PyDisplayMed.append( ' myResult1 = aVisu.ImportFile(medfilename) ' ) + PyDisplayMed.append( ' print "-----> myResult1 = ",myResult1 ' ) + PyDisplayMed.append( ' field_name = medfield.getName() ' ) + PyDisplayMed.append( ' print "-----> field_name = ",field_name ' ) + PyDisplayMed.append( ' mesh_name = medfield.getSupport().getMesh().getName() ' ) + PyDisplayMed.append( ' print "-----> mesh_name = ",mesh_name ' ) + PyDisplayMed.append( ' aMesh1 = aVisu.MeshOnEntity(myResult1,mesh_name,CELL) ' ) + PyDisplayMed.append( ' print "-----> aMesh1 = ",aMesh1 ' ) + PyDisplayMed.append( ' aScalarMap1 = aVisu.ScalarMapOnField(myResult1,mesh_name,NODE,field_name,1) ' ) + PyDisplayMed.append( ' print "-----> aScalarMap1 = ",aScalarMap1 ' ) + PyDisplayMed.append( ' aView.DisplayOnly(aScalarMap1) ' ) + PyDisplayMed.append( ' aView.FitAll() ' ) + PyDisplayMed.append( ' command = "rm " + medfilename ' ) + PyDisplayMed.append( ' os.system(command) ' ) + PyDisplayMed.append( ' print "-----> Delete temporary Med file : ",medfilename ' ) + PyDisplayMed.append( ' print "***************************************************************" ' ) + PyDisplayMed.append( ' print " " ' ) + PyDisplayMed.append( ' return medfield ' ) + DisplayMed = TestSupervMedfieldLoopForiVisu.INode( 'DisplayMed' , PyDisplayMed ) + DisplayMed.SetName( 'DisplayMed' ) + DisplayMed.SetAuthor( '' ) + DisplayMed.SetComment( 'Compute Node' ) + DisplayMed.Coords( 594 , 105 ) + IDisplayMedINmedfield = DisplayMed.InPort( 'INmedfield' , 'objref' ) + IDisplayMedindex = DisplayMed.InPort( 'index' , 'long' ) + IDisplayMedaVisu = DisplayMed.InPort( 'aVisu' , 'objref' ) + IDisplayMedaView = DisplayMed.InPort( 'aView' , 'objref' ) + IDisplayMedGate = DisplayMed.GetInPort( 'Gate' ) + ODisplayMedOUTmedfield = DisplayMed.OutPort( 'OUTmedfield' , 'objref' ) + ODisplayMedGate = DisplayMed.GetOutPort( 'Gate' ) + + # Creation of Loop Nodes + PyInit = [] + PyInit.append( 'def Init(index,min,max,medfield,x1,aVisu,aView): ' ) + PyInit.append( ' if max >= min : ' ) + PyInit.append( ' index = min ' ) + PyInit.append( ' else : ' ) + PyInit.append( ' index = max ' ) + PyInit.append( ' print "Init --> index = ",index ' ) + PyInit.append( ' print " min = ",min ' ) + PyInit.append( ' print " max = ",max ' ) + PyInit.append( ' print " medfield = ",medfield ' ) + PyInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) + PyMoreInit = [] + PyMoreInit.append( 'def More(index,min,max,medfield,x1,aVisu,aView): ' ) + PyMoreInit.append( ' if max >= index : ' ) + PyMoreInit.append( ' DoLoop = 1 ' ) + PyMoreInit.append( ' else : ' ) + PyMoreInit.append( ' DoLoop = 0 ' ) + PyMoreInit.append( ' print "More --> DoLoop = ",DoLoop ' ) + PyMoreInit.append( ' print " index = ",index ' ) + PyMoreInit.append( ' print " min = ",min ' ) + PyMoreInit.append( ' print " max = ",max ' ) + PyMoreInit.append( ' print " medfield = ",medfield ' ) + PyMoreInit.append( ' return DoLoop,index,min,max,medfield,x1,aVisu,aView ' ) + PyNextInit = [] + PyNextInit.append( 'def Next(index,min,max,medfield,x1,aVisu,aView): ' ) + PyNextInit.append( ' index = index + 1 ' ) + PyNextInit.append( ' print "Next --> index = ",index ' ) + PyNextInit.append( ' print " min = ",min ' ) + PyNextInit.append( ' print " max = ",max ' ) + PyNextInit.append( ' print " medfield = ",medfield ' ) + PyNextInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) + Init,EndInit = TestSupervMedfieldLoopForiVisu.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + EndInit.SetName( 'EndInit' ) + EndInit.SetAuthor( 'LD' ) + EndInit.SetComment( 'no comment' ) + EndInit.Coords( 776 , 64 ) + PyEndInit = [] + EndInit.SetPyFunction( '' , PyEndInit ) + IInitDoLoop = Init.GetInPort( 'DoLoop' ) + IInitindex = Init.InPort( 'index' , 'long' ) + IInitmin = Init.InPort( 'min' , 'long' ) + IInitmax = Init.InPort( 'max' , 'long' ) + IInitmedfield = Init.InPort( 'medfield' , 'objref' ) + IInitx1 = Init.InPort( 'x1' , 'double' ) + IInitaVisu = Init.InPort( 'aVisu' , 'objref' ) + IInitaView = Init.InPort( 'aView' , 'objref' ) + IInitGate = Init.GetInPort( 'Gate' ) + OInitDoLoop = Init.GetOutPort( 'DoLoop' ) + OInitindex = Init.GetOutPort( 'index' ) + OInitmin = Init.GetOutPort( 'min' ) + OInitmax = Init.GetOutPort( 'max' ) + OInitmedfield = Init.GetOutPort( 'medfield' ) + OInitx1 = Init.GetOutPort( 'x1' ) + OInitaVisu = Init.GetOutPort( 'aVisu' ) + OInitaView = Init.GetOutPort( 'aView' ) + IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' ) + IEndInitindex = EndInit.GetInPort( 'index' ) + IEndInitmin = EndInit.GetInPort( 'min' ) + IEndInitmax = EndInit.GetInPort( 'max' ) + IEndInitmedfield = EndInit.GetInPort( 'medfield' ) + IEndInitx1 = EndInit.GetInPort( 'x1' ) + IEndInitaVisu = EndInit.GetInPort( 'aVisu' ) + IEndInitaView = EndInit.GetInPort( 'aView' ) + IEndInitGate = EndInit.GetInPort( 'Gate' ) + OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' ) + OEndInitindex = EndInit.GetOutPort( 'index' ) + OEndInitmin = EndInit.GetOutPort( 'min' ) + OEndInitmax = EndInit.GetOutPort( 'max' ) + OEndInitmedfield = EndInit.GetOutPort( 'medfield' ) + OEndInitx1 = EndInit.GetOutPort( 'x1' ) + OEndInitaVisu = EndInit.GetOutPort( 'aVisu' ) + OEndInitaView = EndInit.GetOutPort( 'aView' ) + OEndInitGate = EndInit.GetOutPort( 'Gate' ) + Init.SetName( 'Init' ) + Init.SetAuthor( 'LD' ) + Init.SetComment( 'no comment' ) + Init.Coords( 205 , 63 ) + + # Creation of Links + LInitDisplayaVisuInitaVisu = TestSupervMedfieldLoopForiVisu.Link( OInitDisplayaVisu , IInitaVisu ) + + LInitDisplayaViewInitaView = TestSupervMedfieldLoopForiVisu.Link( OInitDisplayaView , IInitaView ) + + LInitindexEndInitindex = TestSupervMedfieldLoopForiVisu.Link( OInitindex , IEndInitindex ) + + LInitindexDisplayMedindex = TestSupervMedfieldLoopForiVisu.Link( OInitindex , IDisplayMedindex ) + LInitindexDisplayMedindex.AddCoord( 1 , 566 , 215 ) + LInitindexDisplayMedindex.AddCoord( 2 , 566 , 96 ) + + LInitminEndInitmin = TestSupervMedfieldLoopForiVisu.Link( OInitmin , IEndInitmin ) + + LInitmaxEndInitmax = TestSupervMedfieldLoopForiVisu.Link( OInitmax , IEndInitmax ) + + LInitmedfieldMulfield1 = TestSupervMedfieldLoopForiVisu.Link( OInitmedfield , IMulfield1 ) + + LInitx1EndInitx1 = TestSupervMedfieldLoopForiVisu.Link( OInitx1 , IEndInitx1 ) + + LInitx1Mulx1 = TestSupervMedfieldLoopForiVisu.Link( OInitx1 , IMulx1 ) + + LInitaVisuEndInitaVisu = TestSupervMedfieldLoopForiVisu.Link( OInitaVisu , IEndInitaVisu ) + + LInitaVisuDisplayMedaVisu = TestSupervMedfieldLoopForiVisu.Link( OInitaVisu , IDisplayMedaVisu ) + LInitaVisuDisplayMedaVisu.AddCoord( 1 , 570 , 242 ) + LInitaVisuDisplayMedaVisu.AddCoord( 2 , 569 , 263 ) + LInitaVisuDisplayMedaVisu.AddCoord( 3 , 377 , 264 ) + LInitaVisuDisplayMedaVisu.AddCoord( 4 , 376 , 242 ) + + LInitaViewEndInitaView = TestSupervMedfieldLoopForiVisu.Link( OInitaView , IEndInitaView ) + + LInitaViewDisplayMedaView = TestSupervMedfieldLoopForiVisu.Link( OInitaView , IDisplayMedaView ) + + LMulreturnDisplayMedINmedfield = TestSupervMedfieldLoopForiVisu.Link( OMulreturn , IDisplayMedINmedfield ) + + LDisplayMedOUTmedfieldEndInitmedfield = TestSupervMedfieldLoopForiVisu.Link( ODisplayMedOUTmedfield , IEndInitmedfield ) + + # Input datas + IInitindex.Input( 0 ) + IInitmin.Input( 0 ) + IInitmax.Input( 4 ) + IInitx1.Input( 2 ) + + # Input Ports of the graph + #IInitmedfield = Init.GetInPort( 'medfield' ) + + # Output Ports of the graph + #OEndInitindex = EndInit.GetOutPort( 'index' ) + #OEndInitmin = EndInit.GetOutPort( 'min' ) + #OEndInitmax = EndInit.GetOutPort( 'max' ) + #OEndInitmedfield = EndInit.GetOutPort( 'medfield' ) + #OEndInitx1 = EndInit.GetOutPort( 'x1' ) + #OEndInitaVisu = EndInit.GetOutPort( 'aVisu' ) + #OEndInitaView = EndInit.GetOutPort( 'aView' ) + return TestSupervMedfieldLoopForiVisu + + +TestSupervMedfieldLoopForiVisu = DefTestSupervMedfieldLoopForiVisu() diff --git a/examples/TestSupervMedfieldLoopForiVisu.xml b/examples/TestSupervMedfieldLoopForiVisu.xml index 569f0f7..9604a66 100755 --- a/examples/TestSupervMedfieldLoopForiVisu.xml +++ b/examples/TestSupervMedfieldLoopForiVisu.xml @@ -1,536 +1,539 @@ - + + ? - ? - LoopGraph - 1 - ? - -LoopGraph - + ? + TestSupervMedfieldLoopForiVisu + 1 + ? + +LoopGraph_1 + long - Init\index - + Init__index + long - Init\min - + Init__min + long - Init\max - + Init__max + objref - Init\medfield - + Init__medfield + double - Init\x1 - + Init__x1 + long - EndInit\index - + EndInit__index + long - EndInit\min - + EndInit__min + long - EndInit\max - + EndInit__max + objref - EndInit\medfield - + EndInit__medfield + double - EndInit\x1 - + EndInit__x1 + objref - EndInit\aVisu - + EndInit__aVisu + objref - EndInit\aView - - - 20/6/2003 - 15:13:42 - 19/9/2003 - 16:10:16 - 1.04 - ? - ? - ? - 0 - 0 - + EndInit__aView + + + 20/6/2003 - 15:13:42 + 8/4/2005 - 13:52:51 + 1.04 + ? + ? + ? + 0 + 0 + ? - ? - InitDisplay - 3 - ? - + ? + InitDisplay + 3 + ? + InitDisplay - - + + objref - aVisu - + aVisu + objref - aView - - + aView + + InitDisplay - - - - - - - - - - - aVisu = ",aVisu ]]> - - aViewManager = ",aViewManager ]]> - - - aView = ",aView ]]> - - 19/9/2003 - 16:10:16 - 19/9/2003 - 16:10:16 - 1.04 - ? - ? - Compute Node - 0 - 163 - + + + + + + + + + + + aVisu = ",aVisu ]]> + + aViewManager = ",aViewManager ]]> + + + aView = ",aView ]]> + + 8/4/2005 - 13:52:51 + 8/4/2005 - 13:52:51 + 1.04 + ? + ? + Compute Node + 0 + 163 + ? - ? - Init - 4 - EndInit - + ? + Init + 4 + EndInit + Init - + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - + aView + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - - + aView + + Init - - = min : ]]> - - - - index = ",index ]]> - - - - - + + = min : ]]> + + + + index = ",index ]]> + + + + + More - - = index : ]]> - - - - DoLoop = ",DoLoop ]]> - - - - - - + + = index : ]]> + + + + DoLoop = ",DoLoop ]]> + + + + + + Next - - - index = ",index ]]> - - - - - 19/9/2003 - 16:10:16 - 19/9/2003 - 16:10:16 - 1.04 - LD - ? - no comment - 205 - 63 - + + + index = ",index ]]> + + + + + 8/4/2005 - 13:52:51 + 8/4/2005 - 13:52:51 + 1.04 + LD + ? + no comment + 205 + 63 + ? - ? - EndInit - 5 - Init - + ? + EndInit + 5 + Init + EndInit - + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - + aView + long - index - + index + long - min - + min + long - max - + max + objref - medfield - + medfield + double - x1 - + x1 + objref - aVisu - + aVisu + objref - aView - - - - 19/9/2003 - 16:10:16 - 19/9/2003 - 16:10:16 - 1.04 - LD - ? - no comment - 776 - 64 - + aView + + + +? + + 8/4/2005 - 13:52:51 + 8/4/2005 - 13:52:51 + 1.04 + LD + ? + no comment + 776 + 64 + Calculator - Calculator - Mul - 0 - ? - + Calculator + Mul + 0 + ? + Mul - + objref - field1 - + field1 + double - x1 - + x1 + objref - return - - - 19/9/2003 - 16:10:16 - 19/9/2003 - 16:10:16 - 1.04 - LD - localhost/FactoryServer - Multiply a field by a constant - 387 - 104 - + return + + + 8/4/2005 - 13:52:51 + 8/4/2005 - 13:52:51 + 1.04 + LD + localhost/FactoryServer + Multiply a field by a constant + 387 + 104 + ? - ? - DisplayMed - 3 - ? - + ? + DisplayMed + 3 + ? + DisplayMed - + objref - INmedfield - + INmedfield + long - index - + index + objref - aVisu - + aVisu + objref - aView - + aView + objref - OUTmedfield - - + OUTmedfield + + DisplayMed - - - - - - - - - - - - - calc = ",calc ]]> - - Writing Med field in temporary file : ",medfilename ]]> - - calc = ",calc ]]> - - - myResult1 = ",myResult1 ]]> - - field_name = ",field_name ]]> - - mesh_name = ",mesh_name ]]> - - aMesh1 = ",aMesh1 ]]> - - aScalarMap1 = ",aScalarMap1 ]]> - - - - - Delete temporary Med file : ",medfilename ]]> - - - - 19/9/2003 - 16:10:16 - 19/9/2003 - 16:10:16 - 1.04 - ? - ? - Compute Node - 594 - 105 - + + + + + + + + + + + + + calc = ",calc ]]> + + Writing Med field in temporary file : ",medfilename ]]> + + calc = ",calc ]]> + + + myResult1 = ",myResult1 ]]> + + field_name = ",field_name ]]> + + mesh_name = ",mesh_name ]]> + + aMesh1 = ",aMesh1 ]]> + + aScalarMap1 = ",aScalarMap1 ]]> + + + + + Delete temporary Med file : ",medfilename ]]> + + + + 8/4/2005 - 13:52:51 + 8/4/2005 - 13:52:51 + 1.04 + ? + ? + Compute Node + 594 + 105 + InitDisplay - aVisu - Init - aVisu - - + aVisu + Init + aVisu + + InitDisplay - aView - Init - aView - - + aView + Init + aView + + Init - DoLoop - EndInit - DoLoop - - + DoLoop + EndInit + DoLoop + + Init - index - EndInit - index - - + index + EndInit + index + + Init - index - DisplayMed - index - + index + DisplayMed + index + 566 - 215 - + 215 + 566 - 96 - + 96 + Init - min - EndInit - min - - + min + EndInit + min + + Init - max - EndInit - max - - + max + EndInit + max + + Init - medfield - Mul - field1 - - + medfield + Mul + field1 + + Init - x1 - EndInit - x1 - - + x1 + EndInit + x1 + + Init - x1 - Mul - x1 - - + x1 + Mul + x1 + + Init - aVisu - EndInit - aVisu - - + aVisu + EndInit + aVisu + + Init - aVisu - DisplayMed - aVisu - + aVisu + DisplayMed + aVisu + 570 - 242 - + 242 + 569 - 263 - + 263 + 377 - 264 - + 264 + 376 - 242 - + 242 + Init - aView - EndInit - aView - - + aView + EndInit + aView + + Init - aView - DisplayMed - aView - - + aView + DisplayMed + aView + + EndInit - DoLoop - Init - DoLoop - + DoLoop + Init + DoLoop + 205 - 233 - + 233 + 204 - 21 - + 21 + 936 - 20 - + 20 + 935 - 235 - + 235 + Mul - return - DisplayMed - INmedfield - - + return + DisplayMed + INmedfield + + DisplayMed - OUTmedfield - EndInit - medfield - - + OUTmedfield + EndInit + medfield + + -LoopGraph - Init\index - Init - index - +TestSupervMedfieldLoopForiVisu + Init__index + Init + index + 3 - 0 - - -LoopGraph - Init\min - Init - min - + 0 + + +TestSupervMedfieldLoopForiVisu + Init__min + Init + min + 3 - 0 - - -LoopGraph - Init\max - Init - max - + 0 + + +TestSupervMedfieldLoopForiVisu + Init__max + Init + max + 3 - 4 - - -LoopGraph - Init\x1 - Init - x1 - + 4 + + +TestSupervMedfieldLoopForiVisu + Init__x1 + Init + x1 + 7 - 2 - + 2 + diff --git a/examples/testvisu20.xml b/examples/testvisu20.xml index bfb5866..532ee48 100644 --- a/examples/testvisu20.xml +++ b/examples/testvisu20.xml @@ -1,490 +1,493 @@ - + + ? - ? - aNewDataFlow - 1 - ? - -aNewDataFlow - + ? + TestVisu20 + 1 + ? + +aNewDataFlow_1 + long - Init\index - + Init__index + long - Init\min - + Init__min + long - Init\max - + Init__max + double - Init\x1 - + Init__x1 + long - EndOfInit\index - + EndOfInit__index + long - EndOfInit\min - + EndOfInit__min + long - EndOfInit\max - + EndOfInit__max + objref - EndOfInit\aVisu - + EndOfInit__aVisu + objref - EndOfInit\aView - + EndOfInit__aView + objref - EndOfInit\aResult - + EndOfInit__aResult + double - EndOfInit\x1 - - - 13/11/2003 - 11:15:53 - 19/1/2004 - 15:33:34 - 1.05 - ? - ? - ? - 0 - 0 - + EndOfInit__x1 + + + 13/11/2003 - 11:15:53 + 8/4/2005 - 14:3:47 + 1.05 + ? + ? + ? + 0 + 0 + ? - ? - InitDisplay - 3 - ? - + ? + InitDisplay + 3 + ? + InitDisplay - - + + objref - aVisu - + aVisu + objref - aView - + aView + objref - myResult - - + myResult + + InitDisplay - - - - - - - - - - - - - - - - - - - - - aVisu ", aVisu ]]> - - - aViewManager ", aViewManager ]]> - - - - aView ", aView ]]> - - - - - myResult ", myResult ]]> - - - 19/1/2004 - 15:33:34 - 19/1/2004 - 15:33:34 - 1.05 - ? - ? - Compute Node - 0 - 46 - + + + + + + + + + + + + + + + + + + + + + aVisu ", aVisu ]]> + + + aViewManager ", aViewManager ]]> + + + + aView ", aView ]]> + + + + + myResult ", myResult ]]> + + + 8/4/2005 - 14:3:47 + 8/4/2005 - 14:3:47 + 1.05 + ? + ? + Compute Node + 0 + 46 + ? - ? - Init - 4 - EndOfInit - + ? + Init + 4 + EndOfInit + Init - + long - index - + index + long - min - + min + long - max - + max + objref - aVisu - + aVisu + objref - aView - + aView + objref - aResult - + aResult + double - x1 - + x1 + long - index - + index + long - min - + min + long - max - + max + objref - aVisu - + aVisu + objref - aView - + aView + objref - aResult - + aResult + double - x1 - - + x1 + + Init - - = min : ]]> - - - - - - + + = min : ]]> + + + + + + More - - = index : ]]> - - - - - - + + = index : ]]> + + + + + + Next - - - - - - 19/1/2004 - 15:33:34 - 19/1/2004 - 15:33:34 - 1.05 - ? - ? - ? - 190 - 4 - + + + + + + 8/4/2005 - 14:3:47 + 8/4/2005 - 14:3:47 + 1.05 + ? + ? + Compute Node + 190 + 4 + ? - ? - EndOfInit - 5 - Init - + ? + EndOfInit + 5 + Init + EndOfInit - + long - index - + index + long - min - + min + long - max - + max + objref - aVisu - + aVisu + objref - aView - + aView + objref - aResult - + aResult + double - x1 - + x1 + long - index - + index + long - min - + min + long - max - + max + objref - aVisu - + aVisu + objref - aView - + aView + objref - aResult - + aResult + double - x1 - - - - 19/1/2004 - 15:33:34 - 19/1/2004 - 15:33:34 - 1.05 - ? - ? - ? - 553 - 5 - + x1 + + + +? + + 8/4/2005 - 14:3:47 + 8/4/2005 - 14:3:47 + 1.05 + ? + ? + Compute Node + 553 + 5 + ? - ? - DisplayVitesse - 3 - ? - + ? + DisplayVitesse + 3 + ? + DisplayVitesse - + string - index - + index + objref - aVisu - + aVisu + objref - aView - + aView + objref - aResult - + aResult + double - x1 - + x1 + objref - theResult - - + theResult + + DisplayVitesse - - - - - - - - - - - - - - - - - - - - - - - - - - 19/1/2004 - 15:33:34 - 19/1/2004 - 15:33:34 - 1.05 - ? - ? - Compute Node - 374 - 16 - + + + + + + + + + + + + + + + + + + + + + + + + + + 8/4/2005 - 14:3:47 + 8/4/2005 - 14:3:47 + 1.05 + ? + ? + Compute Node + 374 + 16 + InitDisplay - aVisu - Init - aVisu - - + aVisu + Init + aVisu + + InitDisplay - aView - Init - aView - - + aView + Init + aView + + InitDisplay - myResult - Init - aResult - - + myResult + Init + aResult + + Init - DoLoop - EndOfInit - DoLoop - - + DoLoop + EndOfInit + DoLoop + + Init - index - EndOfInit - index - - + index + EndOfInit + index + + Init - index - DisplayVitesse - index - + index + DisplayVitesse + index + 351 - 96 - + 96 + 350 - 38 - + 38 + Init - min - EndOfInit - min - - + min + EndOfInit + min + + Init - max - EndOfInit - max - - + max + EndOfInit + max + + Init - aVisu - EndOfInit - aVisu - - + aVisu + EndOfInit + aVisu + + Init - aVisu - DisplayVitesse - aVisu - - + aVisu + DisplayVitesse + aVisu + + Init - aView - EndOfInit - aView - - + aView + EndOfInit + aView + + Init - aView - DisplayVitesse - aView - - + aView + DisplayVitesse + aView + + Init - aResult - DisplayVitesse - aResult - - + aResult + DisplayVitesse + aResult + + Init - x1 - EndOfInit - x1 - - + x1 + EndOfInit + x1 + + Init - x1 - DisplayVitesse - x1 - - + x1 + DisplayVitesse + x1 + + EndOfInit - DoLoop - Init - DoLoop - - + DoLoop + Init + DoLoop + + DisplayVitesse - theResult - EndOfInit - aResult - + theResult + EndOfInit + aResult + 548 - 183 - + 183 + 548 - 97 - + 97 + -aNewDataFlow - Init\index - Init - index - +TestVisu20 + Init__index + Init + index + 3 - 1 - - -aNewDataFlow - Init\min - Init - min - + 1 + + +TestVisu20 + Init__min + Init + min + 3 - 1 - - -aNewDataFlow - Init\max - Init - max - + 1 + + +TestVisu20 + Init__max + Init + max + 3 - 100 - - -aNewDataFlow - Init\x1 - Init - x1 - + 100 + + +TestVisu20 + Init__x1 + Init + x1 + 7 - 1 - + 1 + diff --git a/examples/testvisu20_multi.py b/examples/testvisu20_multi.py index b83273a..55c5c67 100644 --- a/examples/testvisu20_multi.py +++ b/examples/testvisu20_multi.py @@ -1,15 +1,15 @@ -# Generated python file of Graph aNewDataFlow +# Generated python file of Graph TestVisu20_multi from SuperV import * -# Graph creation of aNewDataFlow -def DefaNewDataFlow() : - aNewDataFlow = Graph( 'aNewDataFlow' ) - aNewDataFlow.SetName( 'aNewDataFlow' ) - aNewDataFlow.SetAuthor( '' ) - aNewDataFlow.SetComment( '' ) - aNewDataFlow.Coords( 0 , 0 ) +# Graph creation of TestVisu20_multi +def DefTestVisu20_multi() : + TestVisu20_multi = Graph( 'TestVisu20_multi' ) + TestVisu20_multi.SetName( 'TestVisu20_multi' ) + TestVisu20_multi.SetAuthor( '' ) + TestVisu20_multi.SetComment( '' ) + TestVisu20_multi.Coords( 0 , 0 ) # Creation of Factory Nodes @@ -50,7 +50,7 @@ def DefaNewDataFlow() : PyInitDisplay.append( ' print "InitDisplay --> myResult ", myResult ' ) PyInitDisplay.append( ' return aVisu,myResult ' ) PyInitDisplay.append( '' ) - InitDisplay = aNewDataFlow.INode( 'InitDisplay' , PyInitDisplay ) + InitDisplay = TestVisu20_multi.INode( 'InitDisplay' , PyInitDisplay ) InitDisplay.SetName( 'InitDisplay' ) InitDisplay.SetAuthor( '' ) InitDisplay.SetComment( 'Compute Node' ) @@ -86,7 +86,7 @@ def DefaNewDataFlow() : PyDisplayVitesse.append( ' #time.sleep(2) ' ) PyDisplayVitesse.append( ' return theResult ' ) PyDisplayVitesse.append( '' ) - DisplayVitesse = aNewDataFlow.INode( 'DisplayVitesse' , PyDisplayVitesse ) + DisplayVitesse = TestVisu20_multi.INode( 'DisplayVitesse' , PyDisplayVitesse ) DisplayVitesse.SetName( 'DisplayVitesse' ) DisplayVitesse.SetAuthor( '' ) DisplayVitesse.SetComment( 'Compute Node' ) @@ -107,7 +107,7 @@ def DefaNewDataFlow() : PyCreateView.append( ' theVisu=aVisu ' ) PyCreateView.append( ' theResult=aResult ' ) PyCreateView.append( ' return aView,theVisu,theResult ' ) - CreateView = aNewDataFlow.INode( 'CreateView' , PyCreateView ) + CreateView = TestVisu20_multi.INode( 'CreateView' , PyCreateView ) CreateView.SetName( 'CreateView' ) CreateView.SetAuthor( '' ) CreateView.SetComment( 'Compute Node' ) @@ -143,7 +143,7 @@ def DefaNewDataFlow() : PyNextInit.append( ' x1=x1+1.0 ' ) PyNextInit.append( ' print "---- Next",index,min,max,aVisu,aView,myResult,x1 ' ) PyNextInit.append( ' return index,min,max,aVisu,aView,myResult,x1 ' ) - Init,EndOfInit = aNewDataFlow.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + Init,EndOfInit = TestVisu20_multi.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) EndOfInit.SetName( 'EndOfInit' ) EndOfInit.SetAuthor( '' ) EndOfInit.SetComment( 'Compute Node' ) @@ -203,7 +203,7 @@ def DefaNewDataFlow() : PyNextLoopOnViews.append( 'def NextViews( aVisu,aResult,ViewCount,MinCount,MaxCount ): ' ) PyNextLoopOnViews.append( ' ViewCount = ViewCount + 1 ' ) PyNextLoopOnViews.append( ' return aVisu,aResult,ViewCount,MinCount,MaxCount ' ) - LoopOnViews,EndOfLoopOnViews = aNewDataFlow.LNode( 'InitViews' , PyLoopOnViews , 'MoreViews' , PyMoreLoopOnViews , 'NextViews' , PyNextLoopOnViews ) + LoopOnViews,EndOfLoopOnViews = TestVisu20_multi.LNode( 'InitViews' , PyLoopOnViews , 'MoreViews' , PyMoreLoopOnViews , 'NextViews' , PyNextLoopOnViews ) EndOfLoopOnViews.SetName( 'EndOfLoopOnViews' ) EndOfLoopOnViews.SetAuthor( '' ) EndOfLoopOnViews.SetComment( 'Compute Node' ) @@ -243,69 +243,69 @@ def DefaNewDataFlow() : LoopOnViews.Coords( 219 , 218 ) # Creation of Links - LInitDisplayaVisuLoopOnViewsaVisu = aNewDataFlow.Link( OInitDisplayaVisu , ILoopOnViewsaVisu ) + LInitDisplayaVisuLoopOnViewsaVisu = TestVisu20_multi.Link( OInitDisplayaVisu , ILoopOnViewsaVisu ) - LInitDisplaymyResultLoopOnViewsaResult = aNewDataFlow.Link( OInitDisplaymyResult , ILoopOnViewsaResult ) + LInitDisplaymyResultLoopOnViewsaResult = TestVisu20_multi.Link( OInitDisplaymyResult , ILoopOnViewsaResult ) - LInitindexEndOfInitindex = aNewDataFlow.Link( OInitindex , IEndOfInitindex ) + LInitindexEndOfInitindex = TestVisu20_multi.Link( OInitindex , IEndOfInitindex ) - LInitindexDisplayVitesseindex = aNewDataFlow.Link( OInitindex , IDisplayVitesseindex ) + LInitindexDisplayVitesseindex = TestVisu20_multi.Link( OInitindex , IDisplayVitesseindex ) LInitindexDisplayVitesseindex.AddCoord( 1 , 590 , 587 ) LInitindexDisplayVitesseindex.AddCoord( 2 , 591 , 527 ) - LInitminEndOfInitmin = aNewDataFlow.Link( OInitmin , IEndOfInitmin ) + LInitminEndOfInitmin = TestVisu20_multi.Link( OInitmin , IEndOfInitmin ) - LInitmaxEndOfInitmax = aNewDataFlow.Link( OInitmax , IEndOfInitmax ) + LInitmaxEndOfInitmax = TestVisu20_multi.Link( OInitmax , IEndOfInitmax ) - LInitaVisuEndOfInitaVisu = aNewDataFlow.Link( OInitaVisu , IEndOfInitaVisu ) + LInitaVisuEndOfInitaVisu = TestVisu20_multi.Link( OInitaVisu , IEndOfInitaVisu ) - LInitaVisuDisplayVitesseaVisu = aNewDataFlow.Link( OInitaVisu , IDisplayVitesseaVisu ) + LInitaVisuDisplayVitesseaVisu = TestVisu20_multi.Link( OInitaVisu , IDisplayVitesseaVisu ) - LInitaViewEndOfInitaView = aNewDataFlow.Link( OInitaView , IEndOfInitaView ) + LInitaViewEndOfInitaView = TestVisu20_multi.Link( OInitaView , IEndOfInitaView ) - LInitaViewDisplayVitesseaView = aNewDataFlow.Link( OInitaView , IDisplayVitesseaView ) + LInitaViewDisplayVitesseaView = TestVisu20_multi.Link( OInitaView , IDisplayVitesseaView ) - LInitaResultDisplayVitesseaResult = aNewDataFlow.Link( OInitaResult , IDisplayVitesseaResult ) + LInitaResultDisplayVitesseaResult = TestVisu20_multi.Link( OInitaResult , IDisplayVitesseaResult ) - LInitx1EndOfInitx1 = aNewDataFlow.Link( OInitx1 , IEndOfInitx1 ) + LInitx1EndOfInitx1 = TestVisu20_multi.Link( OInitx1 , IEndOfInitx1 ) - LInitx1DisplayVitessex1 = aNewDataFlow.Link( OInitx1 , IDisplayVitessex1 ) + LInitx1DisplayVitessex1 = TestVisu20_multi.Link( OInitx1 , IDisplayVitessex1 ) - LEndOfInitaResultEndOfLoopOnViewsaResult = aNewDataFlow.Link( OEndOfInitaResult , IEndOfLoopOnViewsaResult ) + LEndOfInitaResultEndOfLoopOnViewsaResult = TestVisu20_multi.Link( OEndOfInitaResult , IEndOfLoopOnViewsaResult ) LEndOfInitaResultEndOfLoopOnViewsaResult.AddCoord( 1 , 762 , 288 ) LEndOfInitaResultEndOfLoopOnViewsaResult.AddCoord( 2 , 763 , 424 ) LEndOfInitaResultEndOfLoopOnViewsaResult.AddCoord( 3 , 972 , 425 ) LEndOfInitaResultEndOfLoopOnViewsaResult.AddCoord( 4 , 971 , 687 ) - LDisplayVitessetheResultEndOfInitaResult = aNewDataFlow.Link( ODisplayVitessetheResult , IEndOfInitaResult ) + LDisplayVitessetheResultEndOfInitaResult = TestVisu20_multi.Link( ODisplayVitessetheResult , IEndOfInitaResult ) LDisplayVitessetheResultEndOfInitaResult.AddCoord( 1 , 787 , 687 ) LDisplayVitessetheResultEndOfInitaResult.AddCoord( 2 , 786 , 585 ) - LLoopOnViewsaVisuEndOfLoopOnViewsaVisu = aNewDataFlow.Link( OLoopOnViewsaVisu , IEndOfLoopOnViewsaVisu ) + LLoopOnViewsaVisuEndOfLoopOnViewsaVisu = TestVisu20_multi.Link( OLoopOnViewsaVisu , IEndOfLoopOnViewsaVisu ) - LLoopOnViewsaVisuCreateViewaVisu = aNewDataFlow.Link( OLoopOnViewsaVisu , ICreateViewaVisu ) + LLoopOnViewsaVisuCreateViewaVisu = TestVisu20_multi.Link( OLoopOnViewsaVisu , ICreateViewaVisu ) LLoopOnViewsaVisuCreateViewaVisu.AddCoord( 1 , 186 , 643 ) LLoopOnViewsaVisuCreateViewaVisu.AddCoord( 2 , 186 , 442 ) LLoopOnViewsaVisuCreateViewaVisu.AddCoord( 3 , 400 , 441 ) LLoopOnViewsaVisuCreateViewaVisu.AddCoord( 4 , 401 , 251 ) - LLoopOnViewsaResultCreateViewaResult = aNewDataFlow.Link( OLoopOnViewsaResult , ICreateViewaResult ) + LLoopOnViewsaResultCreateViewaResult = TestVisu20_multi.Link( OLoopOnViewsaResult , ICreateViewaResult ) LLoopOnViewsaResultCreateViewaResult.AddCoord( 1 , 169 , 671 ) LLoopOnViewsaResultCreateViewaResult.AddCoord( 2 , 170 , 412 ) LLoopOnViewsaResultCreateViewaResult.AddCoord( 3 , 386 , 413 ) LLoopOnViewsaResultCreateViewaResult.AddCoord( 4 , 387 , 280 ) - LLoopOnViewsViewCountEndOfLoopOnViewsViewCount = aNewDataFlow.Link( OLoopOnViewsViewCount , IEndOfLoopOnViewsViewCount ) + LLoopOnViewsViewCountEndOfLoopOnViewsViewCount = TestVisu20_multi.Link( OLoopOnViewsViewCount , IEndOfLoopOnViewsViewCount ) - LLoopOnViewsMinCountEndOfLoopOnViewsMinCount = aNewDataFlow.Link( OLoopOnViewsMinCount , IEndOfLoopOnViewsMinCount ) + LLoopOnViewsMinCountEndOfLoopOnViewsMinCount = TestVisu20_multi.Link( OLoopOnViewsMinCount , IEndOfLoopOnViewsMinCount ) - LLoopOnViewsMaxCountEndOfLoopOnViewsMaxCount = aNewDataFlow.Link( OLoopOnViewsMaxCount , IEndOfLoopOnViewsMaxCount ) + LLoopOnViewsMaxCountEndOfLoopOnViewsMaxCount = TestVisu20_multi.Link( OLoopOnViewsMaxCount , IEndOfLoopOnViewsMaxCount ) - LCreateViewaViewInitaView = aNewDataFlow.Link( OCreateViewaView , IInitaView ) + LCreateViewaViewInitaView = TestVisu20_multi.Link( OCreateViewaView , IInitaView ) - LCreateViewtheVisuInitaVisu = aNewDataFlow.Link( OCreateViewtheVisu , IInitaVisu ) + LCreateViewtheVisuInitaVisu = TestVisu20_multi.Link( OCreateViewtheVisu , IInitaVisu ) - LCreateViewtheResultInitaResult = aNewDataFlow.Link( OCreateViewtheResult , IInitaResult ) + LCreateViewtheResultInitaResult = TestVisu20_multi.Link( OCreateViewtheResult , IInitaResult ) # Input datas IInitindex.Input( 1 ) @@ -328,7 +328,7 @@ def DefaNewDataFlow() : #OEndOfLoopOnViewsViewCount = EndOfLoopOnViews.GetOutPort( 'ViewCount' ) #OEndOfLoopOnViewsMinCount = EndOfLoopOnViews.GetOutPort( 'MinCount' ) #OEndOfLoopOnViewsMaxCount = EndOfLoopOnViews.GetOutPort( 'MaxCount' ) - return aNewDataFlow + return TestVisu20_multi -aNewDataFlow = DefaNewDataFlow() +TestVisu20_multi = DefTestVisu20_multi() diff --git a/examples/testvisu20_multi.xml b/examples/testvisu20_multi.xml index c8e247c..3023243 100644 --- a/examples/testvisu20_multi.xml +++ b/examples/testvisu20_multi.xml @@ -5,7 +5,7 @@ ? ? - aNewDataFlow + TestVisu20_multi 1 ? @@ -69,7 +69,7 @@ 13/11/2003 - 11:15:53 - 26/1/2005 - 15:3:36 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -132,8 +132,8 @@ myResult ", myResult ]]> - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -219,8 +219,8 @@ - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -284,8 +284,8 @@ ? - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -349,8 +349,8 @@ - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -415,8 +415,8 @@ - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -468,8 +468,8 @@ EndLoop - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -511,8 +511,8 @@ - 26/1/2005 - 15:3:29 - 26/1/2005 - 15:3:29 + 8/4/2005 - 14:2:18 + 8/4/2005 - 14:2:18 1.05 ? ? @@ -738,7 +738,7 @@ -aNewDataFlow +TestVisu20_multi Init__index Init index @@ -747,7 +747,7 @@ 1 -aNewDataFlow +TestVisu20_multi Init__min Init min @@ -756,7 +756,7 @@ 1 -aNewDataFlow +TestVisu20_multi Init__max Init max @@ -765,7 +765,7 @@ 10 -aNewDataFlow +TestVisu20_multi Init__x1 Init x1 @@ -774,7 +774,7 @@ 1 -aNewDataFlow +TestVisu20_multi LoopOnViews__ViewCount LoopOnViews ViewCount @@ -783,7 +783,7 @@ 0 -aNewDataFlow +TestVisu20_multi LoopOnViews__MinCount LoopOnViews MinCount @@ -792,7 +792,7 @@ 0 -aNewDataFlow +TestVisu20_multi LoopOnViews__MaxCount LoopOnViews MaxCount