+# 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
+#
+
import os, shutil
from . import sphere, ellipse, rectangle
from . import utilityFunctions as uF
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():
else:
Group_1 = Maillage_1.CreateEmptyGroup( SMESH.NODE, 'crack' )
nbAdd = Group_1.AddFrom( Maillage_1.GetMesh() )
- Maillage_1.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1)
+ Maillage_1.ExportMED(outFile)
return(True)