X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FcreeZoneDefautDansObjetSain.py;h=24bfeff6cd199d3745b9cc69e532212564235a86;hp=ed7df4701683b75af44ab681a298872a3e5bd142;hb=2cf6435f1492b63b9adf4e8256d88968638ed9bf;hpb=33b6f8700337fa00f3e48076a6f6d8df87d8e57f diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py index ed7df4701..24bfeff6c 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py @@ -17,13 +17,13 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""TODO: a compléter""" import os import logging + from .geomsmesh import smesh -import SMESH -import SALOMEDS from .creeZoneDefautMaillage import creeZoneDefautMaillage from .peauInterne import peauInterne @@ -31,12 +31,11 @@ from .quadranglesToShapeNoCorner import quadranglesToShapeNoCorner from .creeZoneDefautFilling import creeZoneDefautFilling from .creeZoneDefautGeom import creeZoneDefautGeom from .getCentreFondFiss import getCentreFondFiss +from .putName import putName -# ----------------------------------------------------------------------------- -# --- - -def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, - shapeFissureParams, maillageFissureParams): +def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, \ + shapeFissureParams, maillageFissureParams, \ + nro_cas=None): """ #TODO: a compléter """ @@ -65,11 +64,10 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, nomFicSain = maillageFissureParams['nomFicSain'] fichierMaillageSain = os.path.join (nomRep , '{}.med'.format(nomFicSain)) - + # --- centre de fond de fissure et tangente - + edgeFondExt, centreFondFiss, tgtCentre = getCentreFondFiss(shapesFissure) - # --- zone de défaut nomZones = "zoneDefaut" @@ -80,7 +78,8 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, maillageSain.ExportMED(fichierMaillageSain) logging.debug("fichier maillage sain %s", fichierMaillageSain) [maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges] = \ - peauInterne(fichierMaillageSain, shapeDefaut, nomZones) + peauInterne(fichierMaillageSain, shapeDefaut, nomZones, \ + nro_cas) facesDefaut = list() centresDefaut = list() @@ -89,9 +88,10 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, isPlane = False if isHexa and not isPlane: meshQuad = smesh.CopyMesh( zoneDefaut_skin, 'meshQuad', 0, 0) - - fillings, noeuds_bords, bordsPartages, fillconts, idFilToCont = quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss) - + putName(meshQuad, "meshQuad", i_pref=nro_cas) + + fillings, _, bordsPartages, fillconts, idFilToCont = quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss) + for filling in fillings: [faceDefaut, centreDefaut, normalDefaut, extrusionDefaut] = \ creeZoneDefautFilling(filling, shapeDefaut, lgExtrusion) @@ -101,14 +101,15 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, extrusionsDefaut.append(extrusionDefaut) else: [facesDefaut, centreDefaut, normalDefaut, extrusionDefaut] = \ - creeZoneDefautGeom( geometrieSaine, shapeDefaut, origShapes, verticesShapes, dmoyen, lgExtrusion) + creeZoneDefautGeom( geometrieSaine, shapeDefaut, origShapes, verticesShapes, lgExtrusion) bordsPartages = list() - for face in facesDefaut: + for _ in facesDefaut: bordsPartages.append([None,None]) # TODO : traitement des arêtes vives ? fillconts = facesDefaut idFilToCont = list(range(len(facesDefaut))) - return [facesDefaut, centresDefaut, normalsDefaut, extrusionsDefaut, dmoyen, bordsPartages, fillconts, idFilToCont, - maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, + return [facesDefaut, centresDefaut, normalsDefaut, extrusionsDefaut, \ + dmoyen, bordsPartages, fillconts, idFilToCont, \ + maillageSain, internalBoundary, \ + zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \ edgeFondExt, centreFondFiss, tgtCentre] -