X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2FVisuPrs%2FMeshPresentation%2FJ1.py;h=90717f7179218ccdcee3a65422ca9203a0eeb3f1;hb=937b15c6a43ec7efea52bd90272e2e35d89ab37b;hp=2300afcf6d406d594e515b34d0b3cdeb57a3bdae;hpb=1281fe8287ee5f352ab9ad6ff7de1be3d8c54ed2;p=modules%2Fparavis.git diff --git a/test/VisuPrs/MeshPresentation/J1.py b/test/VisuPrs/MeshPresentation/J1.py index 2300afcf..90717f71 100644 --- a/test/VisuPrs/MeshPresentation/J1.py +++ b/test/VisuPrs/MeshPresentation/J1.py @@ -1,9 +1,9 @@ -# Copyright (C) 2010-2013 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 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 # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,16 +18,13 @@ # #This case corresponds to: /visu/MeshPresentation/J1 case -# Create mesh presentation for nodes and cells of the the given MED file +# Create mesh presentation for nodes and cells of the the given MED file 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("MeshPresentation/J1") theFileName = datadir + "DividedGenTetra2.med" @@ -36,10 +33,10 @@ print "file ", theFileName print " --------------------------------- " -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" aView = GetRenderView() @@ -52,9 +49,9 @@ entity_types = [EntityType.NODE,EntityType.CELL] for entity_type in entity_types: entity_name = EntityType.get_name(entity_type) mesh = MeshOnEntity(aProxy, mesh_name ,entity_type) - if mesh is None: + if mesh is None: msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..." - raise RuntimeError, msg + raise RuntimeError, msg mesh.Visibility=1 reset_view(aView) Render() @@ -65,7 +62,7 @@ for entity_type in entity_types: entity_name = EntityType.get_name(entity_type) # Construct image file name pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext - + process_prs_for_test(mesh, aView, pic_name)