# -*- coding: utf-8 -*-
-# Copyright (C) 2014-2021 EDF R&D
+# Copyright (C) 2014-2023 EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
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()
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):
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:
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]
newZoneDefaut_skin = maillageSain.GetMesh().CutListOfGroups([zoneDefaut_skin], facesEnTrop, 'newZoneDefaut_skin')
- putName(newMaillageInterne, 'newInternalBoundary', i_pref=nro_cas)
-
return newZoneDefaut_skin, newMaillageInterne