X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2FmaterielCasTests%2Fdisque_perce.py;h=f7d8700c196f79972e29d5c26bb277a548cb5c7e;hp=2f2730d3d0a2501c177e84c64418d72f90d4fe20;hb=a274ade365bd0f0e19d56c577acc4a13aa1972a7;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54 diff --git a/src/Tools/blocFissure/materielCasTests/disque_perce.py b/src/Tools/blocFissure/materielCasTests/disque_perce.py index 2f2730d3d..f7d8700c1 100644 --- a/src/Tools/blocFissure/materielCasTests/disque_perce.py +++ b/src/Tools/blocFissure/materielCasTests/disque_perce.py @@ -1,10 +1,27 @@ # -*- coding: iso-8859-1 -*- +# Copyright (C) 2014-2021 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 @@ -23,7 +40,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -56,7 +73,7 @@ geompy.addToStudyInFather( Disque, Compound_4, 'Compound_4' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder Disque_1 = smesh.Mesh(Disque) Regular_1D = Disque_1.Segment() @@ -71,7 +88,7 @@ status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4) Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) isDone = Disque_1.Compute() smesh.SetName(Disque_1, 'Disque') -Disque_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/disque.med"), 0, SMESH.MED_V2_2, 1 ) +Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/disque.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() @@ -86,4 +103,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser()