Salome HOME
Updated copyright comment
[modules/smesh.git] / src / Tools / blocFissure / gmu / fusionMaillageAttributionDefaut.py
index 4ad382dc62fbc117b06018e5db50709770d22223..ddcccec0f287bd6c228efc9e84d334daf1b1a817 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2014-2021  EDF R&D
+# Copyright (C) 2014-2024  EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -37,10 +37,11 @@ from .putName import putName
 
 def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible, \
                          zoneDefaut_skin, shapeDefaut, listOfCorners, \
-                         nro_cas=-1):
+                         nro_cas=None):
   """Groupe de quadrangles de face transformé en face géométrique par filling"""
 
   logging.info("start")
+  logging.info("Pour le cas n°%s", nro_cas)
 
   facesNonCoupees = list()
   facesCoupees = list()
@@ -48,7 +49,7 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible
   maillagesCoupes = list()
 
   # On crée une liste contenant le maillage de chaque face.
-  listOfNewMeshes = createNewMeshesFromCorner(maillageDefautCible, listOfCorners)
+  listOfNewMeshes = createNewMeshesFromCorner(maillageDefautCible, listOfCorners, nro_cas)
 
   i_aux = 0
   while i_aux < len(listOfNewMeshes):
@@ -75,7 +76,7 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible
     tmpExplodeNum = geompy.ExtractShapes(tmpPartition, geompy.ShapeType["EDGE"], True)
     if len(tmpExplodeRef) == len(tmpExplodeNum):
       logging.debug("face de filling non coupee")
-      geompy.addToStudy( filling, "faceNonCoupee_{0}".format(i_aux+1)) # doit etre publie pour critere OK plus bas
+      geompy.addToStudy( filling, "faceNonCoupee_{0}".format(i_aux+1)) # doit etre publié pour critère OK plus bas
       facesNonCoupees.append(filling)
       maillagesNonCoupes.append(listOfNewMeshes[i_aux])
     else:
@@ -88,6 +89,7 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible
   listOfInternMeshes = [maillageInterneCible] + [msh.GetMesh() for msh in maillagesNonCoupes]
 
   newMaillageInterne = smesh.Concatenate(listOfInternMeshes, 1, 1, 1e-05, False)
+  putName(newMaillageInterne, 'newInternalBoundary', i_pref=nro_cas)
 
   facesEnTrop = list()
   criteres = [smesh.GetCriterion(SMESH.FACE, SMESH.FT_BelongToGenSurface, SMESH.FT_Undefined, face) for face in facesNonCoupees]
@@ -99,6 +101,4 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible
 
   newZoneDefaut_skin = maillageSain.GetMesh().CutListOfGroups([zoneDefaut_skin], facesEnTrop, 'newZoneDefaut_skin')
 
-  putName(newMaillageInterne, 'newInternalBoundary', i_pref=nro_cas)
-
   return newZoneDefaut_skin, newMaillageInterne