X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FtrouveEdgesFissPeau.py;h=1fbfd5fd7d95304ec35a920ff4439262bdc3dc8b;hp=6b652465036f27a891af11f926be8951f808d88a;hb=HEAD;hpb=b7a7d49664daa32e1befb558280e13ed0bde37c9 diff --git a/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py b/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py index 6b6524650..fcf6c9b78 100644 --- a/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py +++ b/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py @@ -1,32 +1,52 @@ # -*- coding: utf-8 -*- +# 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 +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +"""Pour les faces de peau sans extremité débouchante de fissure, il faut recenser les edges de fissure sur la face de peau""" import logging from .geomsmesh import geompy -from .geomsmesh import geomPublish from .geomsmesh import geomPublishInFather + from . import initLog def trouveEdgesFissPeau(facesInside, facesOnside, edgesPipeIn, edgesFondIn, partitionPeauFissFond, edgesFissExtPeau): - """ - pour les faces de peau sans extremité débouchante de fissure, il faut recenser les edges de fissure sur la face de peau - """ + """Pour les faces de peau sans extremité débouchante de fissure, il faut recenser les edges de fissure sur la face de peau""" logging.info('start') - - j = 0 + + i_aux = 0 for face in facesInside: - edgesPeauFis = [] - edgesPipeFis = [] - edgesPipeFnd = [] + + edgesPeauFis = list() + edgesPipeFis = list() + edgesPipeFnd = list() try: edgesPeauFis = geompy.GetSharedShapesMulti([geompy.MakeCompound(facesOnside), face], geompy.ShapeType["EDGE"]) edgesPipeFis = geompy.GetSharedShapesMulti([geompy.MakeCompound(edgesPipeIn), face], geompy.ShapeType["EDGE"]) edgesPipeFnd = geompy.GetSharedShapesMulti([geompy.MakeCompound(edgesFondIn), face], geompy.ShapeType["EDGE"]) except: pass - if (len(edgesPeauFis) > 0) and (len(edgesPipeFis) > 0) and (len(edgesPipeFnd) == 0): + + if ( edgesPeauFis and edgesPipeFis and ( not edgesPipeFnd ) ): edgesFissExtPeau.append(edgesPeauFis[0]) - name="edgesFissExtPeau%d"%j + name="edgesFissExtPeau{}".format(i_aux) geomPublishInFather(initLog.debug,partitionPeauFissFond, edgesPeauFis[0], name) - j += 1 - return edgesFissExtPeau \ No newline at end of file + i_aux += 1 + + return edgesFissExtPeau