Salome HOME
Copyright update 2020
[modules/smesh.git] / src / Tools / blocFissure / gmu / identifieFacesPeau.py
index 693586b8fbdf9ccaadc1fb685a0d1c5c35fbf7ed..2e08901a7af04ad85023b96d86f12dbcebbc0532 100644 (file)
@@ -1,11 +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 .geomsmesh import geompy
+from .geomsmesh import geomPublish
+from .geomsmesh import geomPublishInFather
+from . import initLog
 
-from sortFaces import sortFaces
-from extractionOrientee import extractionOrientee
+from .sortFaces import sortFaces
+from .extractionOrientee import extractionOrientee
 
 def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss,
                        verticesEdgesFondIn, pipexts, cercles,
@@ -62,7 +83,7 @@ def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss,
       pass
       
   name="partitionPeauByPipe%d"%ifil
-  geompy.addToStudy(partitionPeauByPipe, name)
+  geomPublish(initLog.debug, partitionPeauByPipe, name)
   [edgesPeauFondIn, edgesPeauFondOut, edgesPeauFondOn] = extractionOrientee(fillingFaceExterne, partitionPeauByPipe, centreFondFiss, "EDGE", 1.e-3)
   [facesPeauFondIn, facesPeauFondOut, facesPeauFondOn] = extractionOrientee(fillingFaceExterne, partitionPeauByPipe, centreFondFiss, "FACE", 1.e-3)
     
@@ -73,6 +94,6 @@ def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss,
     facePeau =geompy.MakePartition(facesPeauFondOn, [], [], [], geompy.ShapeType["FACE"], 0, [], 1)
     facesPeauSorted = [facePeau]
   name="facePeau%d"%ifil
-  geompy.addToStudy(facePeau, name)
+  geomPublish(initLog.debug, facePeau, name)
 
   return (facePeau, facesPeauSorted, edgesPeauFondIn)
\ No newline at end of file