X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2FgenereCrack.py;h=5d352de58767190a913e8d9e4347fe8110429785;hb=HEAD;hp=1628cd4654999eda7d1bf37607054c03b53376bc;hpb=d3e1cabf77f67408ac401e2d387e721605cb3b10;p=modules%2Fsmesh.git diff --git a/src/Tools/ZCracksPlug/genereCrack.py b/src/Tools/ZCracksPlug/genereCrack.py index 1628cd465..5d352de58 100644 --- a/src/Tools/ZCracksPlug/genereCrack.py +++ b/src/Tools/ZCracksPlug/genereCrack.py @@ -1,3 +1,22 @@ +# Copyright (C) 2016-2024 EDF +# +# 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 os, shutil from . import sphere, ellipse, rectangle from . import utilityFunctions as uF @@ -212,13 +231,12 @@ def generateCustom(crack, outFile): import salome salome.salome_init() - theStudy = salome.myStudy import salome_notebook - notebook = salome_notebook.NoteBook(theStudy) + notebook = salome_notebook.NoteBook() import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() ([Maillage_1], status) = smesh.CreateMeshesFromMED(crack['med file']) isCrack=False for group in Maillage_1.GetGroups():