1 # Copyright (C) 2010-2015 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # This case corresponds to: /visu/animation/A1 case
25 from paravistest import *
26 from presentations import *
27 from pvsimple import *
28 import pvserver as paravis
30 my_paravis = paravis.myParavis
32 # 1. TimeStamps.med import
33 print 'Importing "TimeStamps.med"................',
34 file_path = datadir + "TimeStamps.med"
35 OpenDataFile(file_path)
36 med_reader = GetActiveSource()
37 if med_reader is None:
42 # 2. CutLines creation
43 print "Creating Cut Lines........................",
45 cutlines = CutLinesOnField(med_reader, EntityType.NODE, med_field, 1,
47 orientation1=Orientation.XY, orientation2=Orientation.ZX)
54 print "Getting a Viewer.........................",
55 view = GetRenderView()
60 cutlines.Visibility = 1
62 cutlines.Visibility = 0
64 display_only(cutlines, view=view)
68 print "Get Animation scene.....................",
69 scene = GetAnimationScene()
75 print "Duration default... ", scene.Duration
80 print "Duration ... ", scene.Duration
82 print "Loop ... ", scene.Loop
84 print "Loop ... ", scene.Loop
86 print "Loop ... ", scene.Loop
88 print "AnimationTime ... ", scene.AnimationTime
96 print "AnimationTime ... ", scene.AnimationTime
103 print "AnimationTime ... ", scene.AnimationTime
105 scene.AnimationTime = -1
106 scene.AnimationTime = scene.TimeKeeper.TimestepValues[1]
107 scene.AnimationTime = scene.TimeKeeper.TimestepValues[0]
109 nb_frames = scene.NumberOfFrames
110 print "NumberOfFrames ... ", nb_frames