X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FfusionMaillageAttributionDefaut.py;h=76147ee31f2e7db67b4a5a6d701b8133058eedfd;hb=db83efeef8e138c5871f1a3ca8d5d4a64653b663;hp=a509c035095d92a0c4ece27b62352d45d3d821b5;hpb=3f80bd10608d0dfcc296dad35cabbcf0705b7af4;p=modules%2Fsmesh.git diff --git a/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py b/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py index a509c0350..76147ee31 100644 --- a/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py +++ b/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py @@ -2,7 +2,7 @@ # Copyright (C) 2014-2021 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 +# modify it under the terms of th79e 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. # @@ -33,11 +33,15 @@ from .geomsmesh import smesh from .listOfExtraFunctions import createNewMeshesFromCorner from .listOfExtraFunctions import createLinesFromMesh +from .putName import putName -def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible, zoneDefaut_skin, shapeDefaut, listOfCorners): +def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible, \ + zoneDefaut_skin, shapeDefaut, listOfCorners, \ + 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() @@ -45,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): @@ -72,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: @@ -85,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] @@ -96,6 +101,4 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible newZoneDefaut_skin = maillageSain.GetMesh().CutListOfGroups([zoneDefaut_skin], facesEnTrop, 'newZoneDefaut_skin') - smesh.SetName(newMaillageInterne, 'newInternalBoundary') - return newZoneDefaut_skin, newMaillageInterne