X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FcreeZoneDefautFilling.py;h=629bab1b29da7fd5a37f978bcb4dfe4b29fd0e06;hp=ed3229eb8f85ccba744b7a8b5ac9a6f0bf48a141;hb=499f29d24922cec66e41b41a0039a954993bc6df;hpb=072a73120b6db7bba2389aa7ada0cde20e22ee57 diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py b/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py index ed3229eb8..629bab1b2 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py @@ -1,15 +1,36 @@ # -*- coding: utf-8 -*- +# Copyright (C) 2014-2022 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 +# +"""Crée zone géométrique défaut a partir d'un filling""" import logging -from geomsmesh import geompy -# ----------------------------------------------------------------------------- -# --- crée zone géométrique défaut a partir d'un filling +from . import initLog + +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather def creeZoneDefautFilling(filling, shapeDefaut, lgExtrusion=50): - """ - Construction CAO de la zone à remailler, quand on utilise un filling, - après appel creeZoneDefautMaillage et quadranglesToShape + """Construction CAO de la zone à remailler, quand on utilise un filling, + après appel creeZoneDefautMaillage et quadranglesToShapeNoCorner + @param filling : la CAO de la peau du défaut reconstituée @param shapeDefaut : objet géométrique représentant la fissure (selon les cas, un point central, ou une shape plus complexe, @@ -21,15 +42,15 @@ def creeZoneDefautFilling(filling, shapeDefaut, lgExtrusion=50): trace = True facesDefaut = filling centreSphere = geompy.MakeCDG(shapeDefaut) - geompy.addToStudy(centreSphere, "cdg_defaut") + geomPublish(initLog.debug, centreSphere, "cdg_defaut") centreDefaut = geompy.MakeProjection(centreSphere, filling) if trace: - geompy.addToStudy(centreDefaut, "centreDefaut") + geomPublish(initLog.debug, centreDefaut, "centreDefaut") normalDefaut = geompy.GetNormal(filling, centreDefaut) if trace: - geompy.addToStudy(normalDefaut, "normalDefaut") + geomPublish(initLog.debug, normalDefaut, "normalDefaut") extrusionDefaut = geompy.MakePrismVecH(filling, normalDefaut, -lgExtrusion) if trace: - geompy.addToStudy(extrusionDefaut, "extrusionDefaut") + geomPublish(initLog.debug, extrusionDefaut, "extrusionDefaut") return facesDefaut, centreDefaut, normalDefaut, extrusionDefaut