1 # Copyright (C) 2010-2013 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.
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/bugs2/C9 case
22 from paravistest import datadir, pictureext, get_picture_dir
23 from presentations import *
27 my_paravis = paravis.myParavis
30 med_file_path = datadir + "TimeStamps.med"
32 my_paravis.ImportFile(med_file_path)
33 med_reader = pvsimple.GetActiveSource()
35 if med_reader is None:
36 raise RuntimeError, "TimeStamps.med was not imported!!!"
38 # 2. Creation of presentations
39 mesh_on_cells = MeshOnEntity(med_reader, "dom", EntityType.CELL)
40 if mesh_on_cells is None :
41 raise RuntimeError, "Mesh presentation is None!!!"
43 view = pvsimple.GetRenderView()
44 display_only(mesh_on_cells, view)
47 mesh_on_cells.Representation = 'Wireframe'
49 scalar_map = ScalarMapOnField(med_reader, EntityType.NODE, "vitesse", 1)
50 if scalar_map is None :
51 raise RuntimeError, "ScalarMap presentation is None!!!"
53 scalar_map.Visibility = 1
56 pvsimple.Delete(scalar_map)