X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FfusionMaillageAttributionDefaut.py;h=7ed8d7e512b0d6b51630cc8c8c432bcb3f0821e6;hb=2ad0face0c180fc43e95fd7f2140e6f3982e2a3b;hp=89fef3ae55397c007ed03144bd3a374398bf5d91;hpb=cfa45d551fd47dd3648dea6e50ac74329b0d9e5d;p=modules%2Fsmesh.git diff --git a/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py b/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py index 89fef3ae5..7ed8d7e51 100644 --- a/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py +++ b/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (C) 2014-2020 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 +# 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 +# """ Created on Tue Jun 24 09:14:13 2014 @@ -6,13 +24,16 @@ Created on Tue Jun 24 09:14:13 2014 """ import logging -from geomsmesh import geompy -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import smesh +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM import SMESH -from listOfExtraFunctions import createNewMeshesFromCorner -from listOfExtraFunctions import createLinesFromMesh +from .listOfExtraFunctions import createNewMeshesFromCorner +from .listOfExtraFunctions import createLinesFromMesh # ----------------------------------------------------------------------------- # --- groupe de quadrangles de face transformé en face géométrique par filling @@ -49,19 +70,19 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible # on recrée un objet GEOM temporaire par filling. filling = geompy.MakeFilling(geompy.MakeCompound(setOfLines), 2, 5, 0.0001, 0.0001, 0, GEOM.FOM_Default, True) #logging.debug("face de filling") - #geompy.addToStudy(filling, 'filling_{0}'.format(i + 1)) + #geomPublish(initLog.debug, filling, 'filling_{0}'.format(i + 1)) tmpPartition = geompy.MakePartition([filling], [shapeDefaut], [], [], geompy.ShapeType["FACE"], 0, [], 0) tmpExplodeRef = geompy.ExtractShapes(filling, geompy.ShapeType["EDGE"], True) 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 + 1)) + geompy.addToStudy( filling, "faceNonCoupee_{0}".format(i + 1)) # doit etre publie pour critere OK plus bas facesNonCoupees.append(filling) maillagesNonCoupes.append(listOfNewMeshes[i]) else: logging.debug("face de filling coupee") - geompy.addToStudy(filling, "faceCoupee_{0}".format(i + 1)) + geompy.addToStudy( filling, "faceCoupee_{0}".format(i + 1)) facesCoupees.append(filling) maillagesCoupes.append(listOfNewMeshes[i])