X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2Frectangle.py;h=3d397d52c6d4349a6d03eb736d4f42c79a434256;hb=9d0765db5d66008669b55c3388966a8de3755c92;hp=142cac57fe4b988e86ad06738692f06346df17ef;hpb=2620c8a9db1ba4d0ba49b9bec2b75db0dbb859d8;p=modules%2Fsmesh.git diff --git a/src/Tools/ZCracksPlug/rectangle.py b/src/Tools/ZCracksPlug/rectangle.py index 142cac57f..3d397d52c 100644 --- a/src/Tools/ZCracksPlug/rectangle.py +++ b/src/Tools/ZCracksPlug/rectangle.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (C) 2016-2020 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 +# ### ### This file is generated automatically by SALOME v7.7.1 with dump python functionality @@ -8,10 +26,9 @@ import sys, numpy import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) +notebook = salome_notebook.NoteBook() ### ### GEOM component @@ -65,7 +82,7 @@ def generate(data_longueur,data_largeur,data_centre, Vnormale, Vdirection, Vortho = uF.calcCoordVectors(data_normale, data_direction) Vcentre = numpy.array(data_centre) - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -211,16 +228,16 @@ def generate(data_longueur,data_largeur,data_centre, import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() Maillage=uF.meshCrack(FACE_FISSURE, minSize, maxSize, chordal, dim) try: - Maillage.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage.ExportMED(outFile) smesh.SetName(Maillage.GetMesh(), 'MAILLAGE_FISSURE') except: - print('ExportToMEDX() failed. Invalid file name?') + print('ExportMED() failed. Invalid file name?') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser()