]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Add animation testing
authorsmh <smh@opencascade.com>
Thu, 22 Apr 2004 07:26:16 +0000 (07:26 +0000)
committersmh <smh@opencascade.com>
Thu, 22 Apr 2004 07:26:16 +0000 (07:26 +0000)
src/VISU_SWIG/batchmode_visu_view3d.py
src/VISU_SWIG/visu_view3d.py

index fa2034a745a833bcfadba89b3d1723948511c4ca..2aa8fa4a076d91c499fae4e12c91166e72ea07df 100644 (file)
@@ -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()
index ea6d8ec2e207772659f6f7da143e491159a93997..92c0b2b68d00a9c8798161ff1794a034bbc91160 100644 (file)
@@ -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()