Salome HOME
Merge branch 'master' into gni/evolution
[modules/smesh.git] / src / Tools / blocFissure / gmu / peauInterne.py
index 4e4004e404549110ad3b99a338121a6e991e721c..cb444f2857ea6330d43885e18fbbf60c9b193590 100644 (file)
@@ -1,4 +1,22 @@
 # -*- 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 smesh
@@ -16,6 +34,7 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones):
   """
   Retrouve les groupes de défaut dans le maillage sain modifié par CreateHoleSkin (CreeZoneDefautMaillage)
   On récupère le volume et la peau de la zone de défaut, les éventuelles faces et arêtes internes de cette zone.
+  Remarque : intérêt du passage par fichierMaillage plutôt que par maillageSain ?
   """
   logging.info("start")
   ([maillageSain], status) = smesh.CreateMeshesFromMED(fichierMaillage)
@@ -68,8 +87,8 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones):
   
   maillageDefautCible = smesh.CopyMesh(zoneDefaut_skin, 'maillageCible', 0, 0)
   listOfCorner = lookForCorner(maillageDefautCible)
-  logging.debug("listOfCorner = %s", listOfCorner)
-  if len(listOfCorner) > 0:
+  logging.debug("listOfCorner = {}".format(listOfCorner))
+  if listOfCorner:
       logging.info("présence de coins à la surface externe de la zone à reconstruire")
       zoneDefaut_skin, internalBoundary = fusionMaillageDefaut(maillageSain, maillageDefautCible, internalBoundary, zoneDefaut_skin, shapeDefaut, listOfCorner)