X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2FmaterielCasTests%2FeprouvetteCourbe.py;h=38bfdd0f68841de9f59568c2132846200791c7ca;hp=9098f115f54fe7c5921662c636c780503bbe8e10;hb=6d32f944a0a115b6419184c50b57bf7c4eef5786;hpb=f6e2eed4240c426f1e65b40d1bd7e8d109a4d4b5 diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py index 9098f115f..38bfdd0f6 100644 --- a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py +++ b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py @@ -1,10 +1,27 @@ # -*- coding: utf-8 -*- +# Copyright (C) 2014-2019 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, 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 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +39,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -72,7 +89,7 @@ geompy.addToStudyInFather( EprouvetteCourbe, Compound_x, 'Compound_x' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder EprouvetteCourbe_1 = smesh.Mesh(EprouvetteCourbe) Regular_1D = EprouvetteCourbe_1.Segment() @@ -88,7 +105,7 @@ Nb_Segments_3 = Regular_1D_2.NumberOfSegments(25) Nb_Segments_3.SetDistrType( 0 ) isDone = EprouvetteCourbe_1.Compute() smesh.SetName(EprouvetteCourbe_1, 'EprouvetteCourbe') -EprouvetteCourbe_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med"), 0, SMESH.MED_V2_2, 1 ) +EprouvetteCourbe_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() @@ -104,4 +121,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser()