1 # Copyright (C) 2010-2016 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 salome.myStudy.Open(file_name)
50 from pvsimple import *
52 obj = FindSource('IsoSurfaces')
54 print("FAILED: can't find IsoSurfaces!!!")
56 # 4. Remove med reader object and all other sources
57 for obj in list(GetSources().values()):
58 presentations.delete_pv_object(obj)
61 obj = FindSource('ScalarMap')
63 print("FAILED: ScalarMap was not deleted!!!")