Salome HOME
bos #20646 [CEA] Fix error in polyhedron per solid on pentahedron
[modules/smesh.git] / src / Tools / blocFissure / gmu / identifieElementsFissure.py
index e886240342f3039df19864cb39152505639be846..f67f26a9ac55ea901bf834e5a0bba8770f31077a 100644 (file)
@@ -1,10 +1,32 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-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 logging
 
-from geomsmesh import geompy
-from extractionOrientee import extractionOrientee
-from extractionOrienteeMulti import extractionOrienteeMulti
+from .geomsmesh import geompy
+from .geomsmesh import geomPublish
+from .geomsmesh import geomPublishInFather
+from . import initLog
+
+from .extractionOrientee import extractionOrientee
+from .extractionOrienteeMulti import extractionOrienteeMulti
  
 def identifieElementsFissure(ifil, facesDefaut, partitionPeauFissFond,
                              edgesPipeFiss, edgesFondFiss, aretesVivesC,
@@ -19,9 +41,9 @@ def identifieElementsFissure(ifil, facesDefaut, partitionPeauFissFond,
   logging.info('start')
 
   edgesPipeC = geompy.GetInPlace(partitionPeauFissFond, geompy.MakeCompound(edgesPipeFiss))
-  geompy.addToStudyInFather(partitionPeauFissFond, edgesPipeC, "edgesPipeFiss")
+  geomPublishInFather(initLog.debug, partitionPeauFissFond, edgesPipeC, "edgesPipeFiss")
   edgesFondC = geompy.GetInPlace(partitionPeauFissFond, geompy.MakeCompound(edgesFondFiss))
-  geompy.addToStudyInFather(partitionPeauFissFond, edgesFondC, "edgesFondFiss")
+  geomPublishInFather(initLog.debug, partitionPeauFissFond, edgesFondC, "edgesFondFiss")
   
   if aretesVivesC is None:
     [edgesInside, edgesOutside, edgesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "EDGE", 1.e-3)
@@ -38,9 +60,9 @@ def identifieElementsFissure(ifil, facesDefaut, partitionPeauFissFond,
       vertices = geompy.GetSharedShapesMulti([edge, geompy.MakeCompound(facesOnside)], geompy.ShapeType["VERTEX"])
       verticesPipePeau.append(vertices[0])
       name = "edgePipeIn%d"%i
-      geompy.addToStudyInFather(partitionPeauFissFond, edge, name)
+      geomPublishInFather(initLog.debug, partitionPeauFissFond, edge, name)
       name = "verticePipePeau%d"%i
-      geompy.addToStudyInFather(partitionPeauFissFond, vertices[0], name)
+      geomPublishInFather(initLog.debug, partitionPeauFissFond, vertices[0], name)
       logging.debug("edgePipeIn%s coupe les faces OnSide", i)
     except:
       logging.debug("edgePipeIn%s ne coupe pas les faces OnSide", i)