X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2Fellipse.py;h=127592dc69ca1cd2a4dec7035606bce48493304b;hb=499f29d24922cec66e41b41a0039a954993bc6df;hp=112c76bcfa614b69160d053eea2be18fdad7b73b;hpb=d5029840731bccaa1718e65f0abf3b19198c7293;p=modules%2Fsmesh.git diff --git a/src/Tools/ZCracksPlug/ellipse.py b/src/Tools/ZCracksPlug/ellipse.py index 112c76bcf..127592dc6 100644 --- a/src/Tools/ZCracksPlug/ellipse.py +++ b/src/Tools/ZCracksPlug/ellipse.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (C) 2016-2022 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 @@ -9,10 +27,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 @@ -45,7 +62,7 @@ def generate(data_demi_grand_axe, data_centre, data_normale, 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) @@ -172,7 +189,7 @@ def generate(data_demi_grand_axe, data_centre, data_normale, import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() A=numpy.pi/(30.) minAxes=numpy.min([data_demi_grand_axe,data_demi_petit_axe]) @@ -189,14 +206,14 @@ def generate(data_demi_grand_axe, data_centre, data_normale, 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?') ## Set names of Mesh objects if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser()