X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2FVisuPrs%2FIsoSurfaces%2FG2.py;h=674cc9d48161155600352d719b5139fc384e3895;hb=7f6b6b47c94b937bf2f87c286f5bd428e7c32b5a;hp=f1a452a60f1c3bfa985c92339305df377aa61e97;hpb=e32938b374fc9583c1dc3a69a3b3ec23e7c49b3e;p=modules%2Fparavis.git diff --git a/test/VisuPrs/IsoSurfaces/G2.py b/test/VisuPrs/IsoSurfaces/G2.py index f1a452a6..674cc9d4 100644 --- a/test/VisuPrs/IsoSurfaces/G2.py +++ b/test/VisuPrs/IsoSurfaces/G2.py @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2014 CEA/DEN, EDF R&D +# Copyright (C) 2010-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,10 +24,7 @@ import sys from paravistest import datadir, pictureext, get_picture_dir from presentations import * from pvsimple import * -import paravis -# Create presentations -myParavis = paravis.myParavis picturedir = get_picture_dir("IsoSurfaces/G2") theFileName = datadir + "Bug829_resu_mode.med" @@ -37,10 +34,10 @@ print " --------------------------------- " """Build presentations of the given types for all fields of the given file.""" #print "Import %s..." % theFileName.split('/')[-1], -result = myParavis.ImportFile(theFileName) +result = OpenDataFile(theFileName) aProxy = GetActiveSource() if aProxy is None: - raise RuntimeError, "Error: can't import file." + raise RuntimeError, "Error: can't import file." else: print "OK" # Get viewScalarMap aView = GetRenderView() @@ -59,19 +56,19 @@ for i in range(1,11): #display only current scalar map display_only(aPrs, aView) reset_view(aView) - Render(aView) - + Render(aView) + # Add path separator to the end of picture path if necessery if not picturedir.endswith(os.sep): picturedir += os.sep prs_type = PrsTypeEnum.ISOSURFACES - + # Get name of presentation type - prs_name = PrsTypeEnum.get_name(prs_type) + prs_name = PrsTypeEnum.get_name(prs_type) f_prs_type = prs_name.replace(' ', '').upper() # Construct image file name pic_name = picturedir + aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext - + # Show and record the presentation process_prs_for_test(aPrs, aView, pic_name)