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/bugs3/D3 case
22 from paravistest import datadir
23 from presentations import *
24 import pvserver as paravis
27 my_paravis = paravis.myParavis
29 # 1. Import of the "LinearStaticsSTA9.resu.med" file
30 med_file_path = datadir + "LinearStaticsSTA9.resu.med"
31 OpenDataFile(med_file_path)
32 med_reader = pvsimple.GetActiveSource()
33 if med_reader is None:
34 raise RuntimeError, "LinearStaticsSTA9.resu.med was not imported!!!"
36 view = pvsimple.GetRenderView()
38 # Creation of colored "DeformedShape" presentations, based on time stamps of "RESU_DEPL" field
39 presentation = DeformedShapeOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1, is_colored=True)
40 if presentation is None :
41 raise RuntimeError, "DeformedShapeOnField Presentation is None!!!"
43 display_only(presentation, view)
46 # Creation of colored "Vectors" presentations, based on time stamps of "RESU_DEPL" field
47 presentation = VectorsOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1, is_colored=True)
48 if presentation is None :
49 raise RuntimeError, "Vectors Presentation is None!!!"
51 display_only(presentation, view)
54 # Creation of colored "DeformedShapeAndScalarMap" presentations, based on time stamps of "RESU_DEPL" field
55 presentation = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
56 if presentation is None :
57 raise RuntimeError, "DeformedShapeAndScalarMap Presentation is None!!!"
59 display_only(presentation, view)
62 # Creation of colored "CutPlanes" presentations, based on time stamps of "RESU_DEPL" field
63 presentation = CutPlanesOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
64 if presentation is None :
65 raise RuntimeError, "CutPlanes Presentation is None!!!"
67 display_only(presentation, view)