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/dump_study/B5 case
26 class SalomeSession(object):
30 sys.argv += ["--show-desktop=1"]
31 sys.argv += ["--splash=0"]
32 sys.argv += ["--modules=MED,VISU,PARAVIS"]
33 clt, d = runSalome.main()
40 # 1. Opening saved study
43 salome_session = SalomeSession()
46 file_name = os.path.join(os.path.dirname(sys.argv[0]), "test1.hdf")
47 opened_study = salome.myStudyManager.Open(file_name)
48 salome.myStudy = opened_study
50 # 2. Load PARAVIS module
51 import pvserver as paravis
54 from pvsimple import *
55 obj = FindSource('IsoSurfaces')
57 print "FAILED: can't find IsoSurfaces!!!"
59 # 4. Remove med reader object and all other sources
60 for obj in GetSources().values():
64 obj = FindSource('ScalarMap')
66 print "FAILED: ScalarMap was not deleted!!!"