Salome HOME
Merge branch 'V9_2_2_BR'
[modules/smesh.git] / src / Tools / blocFissure / gmu / insereFissureElliptique.py
index 95d4a627970fafb40b8b822eca918318aff58900..d46c5489554da8bf4fc724787a4d1e1ad27bbb55 100644 (file)
@@ -1,24 +1,45 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2019  CEA/DEN, 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 logging
 import salome
-from geomsmesh import geompy
-from geomsmesh import smesh
+from .geomsmesh import geompy
+from .geomsmesh import geomPublish
+from .geomsmesh import geomPublishInFather
+from . import initLog
+from .geomsmesh import smesh
 import SMESH
 import math
 
-from partitionBlocDefaut import partitionBlocDefaut
-from facesVolumesToriques import facesVolumesToriques
-from facesCirculaires import facesCirculaires
-from propagateTore import propagateTore
-from sortGeneratrices import sortGeneratrices
-from facesFissure import facesFissure
-from facesToreInBloc import facesToreInBloc
-from shapeSurFissure import shapeSurFissure
-from meshBlocPart import meshBlocPart
-from enleveDefaut import enleveDefaut
-from regroupeSainEtDefaut import RegroupeSainEtDefaut
-from putName import putName
+from .partitionBlocDefaut import partitionBlocDefaut
+from .facesVolumesToriques import facesVolumesToriques
+from .facesCirculaires import facesCirculaires
+from .propagateTore import propagateTore
+from .sortGeneratrices import sortGeneratrices
+from .facesFissure import facesFissure
+from .facesToreInBloc import facesToreInBloc
+from .shapeSurFissure import shapeSurFissure
+from .meshBlocPart import meshBlocPart
+from .enleveDefaut import enleveDefaut
+from .regroupeSainEtDefaut import RegroupeSainEtDefaut
+from .putName import putName
  
 # -----------------------------------------------------------------------------
 # --- procedure complete fissure elliptique
@@ -98,12 +119,12 @@ def insereFissureElliptique(geometriesSaines, maillagesSains,
   #plane1 = self.rotTrans(Plane_1, orientation, centreDefaut, normalDefaut)
   #ellipsoide1 = self.rotTrans(ellipsoide, orientation, centreDefaut, normalDefaut)
 
-  #geompy.addToStudy( pipe0, 'pipe0' )
-  #geompy.addToStudy( gener1, 'gener1' )
-  #geompy.addToStudy( pipe1, 'pipe1' )
-  #geompy.addToStudy( facefis1, 'facefis1' )
-  #geompy.addToStudy( plane1, 'plane1' )
-  #geompy.addToStudy( ellipsoide1, 'ellipsoide1' )
+  #geomPublish(initLog.debug,  pipe0, 'pipe0' )
+  #geomPublish(initLog.debug,  gener1, 'gener1' )
+  #geomPublish(initLog.debug,  pipe1, 'pipe1' )
+  #geomPublish(initLog.debug,  facefis1, 'facefis1' )
+  #geomPublish(initLog.debug,  plane1, 'plane1' )
+  #geomPublish(initLog.debug,  ellipsoide1, 'ellipsoide1' )
 
   # --- partition du bloc défaut par génératrice, tore et plan fissure
   if step == 7:
@@ -186,11 +207,11 @@ def insereFissureElliptique(geometriesSaines, maillagesSains,
 
   if step == 18:
     return None
-  maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 )
+  maillageComplet.ExportMED(fichierMaillageFissure)
   putName(maillageComplet, nomFicFissure)
   logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
 
   if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(1)
+    salome.sg.updateObjBrowser()
 
   return maillageComplet