X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FquadranglesToShapeWithCorner.py;h=fa7536e6343ec54dee802e1bfdfc52f14400bf72;hp=6b595678659a83735b5b4e1be5fc17401767aa94;hb=HEAD;hpb=71e110654cdcad80ed80b0e6f3bee102dcfa7147 diff --git a/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py b/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py index 6b5956786..9559670c2 100644 --- a/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py +++ b/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2014-2020 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 @@ -17,18 +17,17 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -""" -Created on Tue Jun 24 09:14:13 2014 - -@author: I48174 -""" +"""Remarque : cette focntion n'est jamais appelée ????""" import logging + +import GEOM + from .geomsmesh import geompy from .geomsmesh import geomPublish from .geomsmesh import geomPublishInFather + from . import initLog -import GEOM from .listOfExtraFunctions import createNewMeshesFromCorner from .listOfExtraFunctions import createLinesFromMesh @@ -37,8 +36,7 @@ from .listOfExtraFunctions import createLinesFromMesh # --- groupe de quadrangles de face transformé en face géométrique par filling def quadranglesToShapeWithCorner(meshQuad, shapeDefaut, listOfCorners): - """ """ - # TODO: rédiger la docstring + """TODO: rédiger la docstring""" logging.info("start") @@ -80,11 +78,11 @@ def quadranglesToShapeWithCorner(meshQuad, shapeDefaut, listOfCorners): tmpFace.append(line) setOfLines.append(tmpFace) - for i, face in enumerate(setOfLines): + for i_aux, face in enumerate(setOfLines): # A partir des lignes de chaque face, # on recrée un objet GEOM temporaire par filling. filling = geompy.MakeFilling(geompy.MakeCompound(face), 2, 5, 0.0001, 0.0001, 0, GEOM.FOM_Default, True) - geomPublish(initLog.debug, filling, 'filling_{}'.format(i + 1)) + geomPublish(initLog.debug, filling, 'filling_{}'.format(i_aux+1)) tmpFillings.append(filling) for face in setOfNodes: @@ -98,27 +96,27 @@ def quadranglesToShapeWithCorner(meshQuad, shapeDefaut, listOfCorners): line = geompy.MakeInterpol(tmpPoints, False, False) tmpBords.append(line) - for i, filling in enumerate(tmpFillings): + for i_aux, filling in enumerate(tmpFillings): tmpPartition = geompy.MakePartition([filling], [shapeDefaut], list(), list(), geompy.ShapeType["FACE"], 0, list(), 0, True) tmpExplodeRef = geompy.ExtractShapes(filling, geompy.ShapeType["EDGE"], True) tmpExplodeNum = geompy.ExtractShapes(tmpPartition, geompy.ShapeType["EDGE"], True) if len(tmpExplodeRef) == len(tmpExplodeNum): - geomPublish(initLog.debug, filling, "faceNonCoupee_{}".format(i + 1)) + geomPublish(initLog.debug, filling, "faceNonCoupee_{}".format(i_aux+1)) facesNonCoupees.append(filling) else: - geomPublish(initLog.debug, filling, "faceCoupee_{}".format(i + 1)) + geomPublish(initLog.debug, filling, "faceCoupee_{}".format(i_aux+1)) facesCoupees.append(filling) fillings = facesCoupees, facesNonCoupees - for i, filling in enumerate(tmpBords): + for i_aux, filling in enumerate(tmpBords): tmpPartition = geompy.MakePartition([shapeDefaut], [filling], list(), list(), geompy.ShapeType["SHELL"], 0, list(), 0, True) tmpExplodeRef = geompy.ExtractShapes(shapeDefaut, geompy.ShapeType["EDGE"], True) + geompy.ExtractShapes(shapeDefaut, geompy.ShapeType["VERTEX"], True) tmpExplodeNum = geompy.ExtractShapes(tmpPartition, geompy.ShapeType["EDGE"], True) + geompy.ExtractShapes(tmpPartition, geompy.ShapeType["VERTEX"], True) if len(tmpExplodeRef) == len(tmpExplodeNum): - geomPublish(initLog.debug, filling, "areteNonCoupee_{}".format(i + 1)) + geomPublish(initLog.debug, filling, "areteNonCoupee_{}".format(i_aux+1)) aretesNonCoupees.append(filling) else: - geomPublish(initLog.debug, filling, "areteCoupee_{}".format(i + 1)) + geomPublish(initLog.debug, filling, "areteCoupee_{}".format(i_aux+1)) aretesCoupees.append(filling) bords_Partages = aretesCoupees, aretesNonCoupees