Salome HOME
f290936745d1931a6247e4d1a218e793aa83a228
[modules/paravis.git] / test / VisuPrs / bugs / A3.py
1 # Copyright (C) 2010-2015  CEA/DEN, EDF R&D
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # This case corresponds to: /visu/bugs/A3 case
21
22 import time
23 from paravistest import datadir
24 from presentations import *
25 import pvserver as paravis
26 import pvsimple
27
28 my_paravis = paravis.myParavis
29
30 # 1. Import MED file
31 med_file_path = datadir + "hexa_28320_ELEM.med"
32 OpenDataFile(med_file_path)
33 med_reader = pvsimple.GetActiveSource()
34
35 # 2. Create vectors
36 vectors = VectorsOnField(med_reader, EntityType.CELL, "vitesse_elem_dom_pb1", 2) # 1e-05
37
38 display_only(vectors)
39 reset_view()
40 time.sleep(1)
41
42 vectors.Input.SetScaleFactor = 0.005
43 display_only(vectors)
44 reset_view()
45 time.sleep(1)
46
47
48 vectors.Input.SetScaleFactor = 0.002
49 display_only(vectors)
50 reset_view()
51 time.sleep(1)