From 67994f4ab9b09b6b9abe4236b41af3387b452475 Mon Sep 17 00:00:00 2001 From: smh Date: Thu, 22 Apr 2004 07:26:16 +0000 Subject: [PATCH] Add animation testing --- src/VISU_SWIG/batchmode_visu_view3d.py | 26 ++++++++++++++++++++++++++ src/VISU_SWIG/visu_view3d.py | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/VISU_SWIG/batchmode_visu_view3d.py b/src/VISU_SWIG/batchmode_visu_view3d.py index fa2034a7..2aa8fa4a 100644 --- a/src/VISU_SWIG/batchmode_visu_view3d.py +++ b/src/VISU_SWIG/batchmode_visu_view3d.py @@ -138,3 +138,29 @@ time.sleep(aDelay) myView.RestoreViewParams('BBB'); print "myView.RestoreViewParams('BBB')" + +# Time animation +myView.EraseAll() +medFile = "TimeStamps.med" +myFieldName = "vitesse"; + +medFile = os.getenv('KERNEL_ROOT_DIR') + '/examples/' + medFile +myResult = myVisu.ImportFile(medFile) + +anAnim = myVisu.CreateAnimation(myView); +aSObj = myStudy.FindObjectIOR(myResult.GetID()) +aSObj = aSObj.FindSubObject(1)[1] +aSObj = aSObj.FindSubObject(2)[1] +aSObj = aSObj.FindSubObject(2)[1] +anAnim.addField(aSObj) +anAnim.setPresentationType(0,VISU.TISOSURFACE) +print "Generate presentations" +anAnim.generatePresentations(0) +print "Generate frames" +anAnim.generateFrames() +print "Start Animation" +anAnim.setSpeed(12) +#anAnim.setCycling(1) +anAnim.startAnimation() +myView.FitAll() +#anAnim.clearView() diff --git a/src/VISU_SWIG/visu_view3d.py b/src/VISU_SWIG/visu_view3d.py index ea6d8ec2..92c0b2b6 100644 --- a/src/VISU_SWIG/visu_view3d.py +++ b/src/VISU_SWIG/visu_view3d.py @@ -138,3 +138,29 @@ time.sleep(aDelay) myView.RestoreViewParams('BBB'); print "myView.RestoreViewParams('BBB')" + +# Time animation +myView.EraseAll() +medFile = "TimeStamps.med" +myFieldName = "vitesse"; + +medFile = os.getenv('KERNEL_ROOT_DIR') + '/examples/' + medFile +myResult = myVisu.ImportFile(medFile) + +anAnim = myVisu.CreateAnimation(myView); +aSObj = myStudy.FindObjectIOR(myResult.GetID()) +aSObj = aSObj.FindSubObject(1)[1] +aSObj = aSObj.FindSubObject(2)[1] +aSObj = aSObj.FindSubObject(2)[1] +anAnim.addField(aSObj) +anAnim.setPresentationType(0,VISU.TISOSURFACE) +print "Generate presentations" +anAnim.generatePresentations(0) +print "Generate frames" +anAnim.generateFrames() +print "Start Animation" +anAnim.setSpeed(12) +#anAnim.setCycling(1) +anAnim.startAnimation() +myView.FitAll() +#anAnim.clearView() -- 2.39.2