X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FfindWireEndVertices.py;h=82ea4d62e8315a13b5fc8b0097ee3f91e1a9a21c;hb=71e110654cdcad80ed80b0e6f3bee102dcfa7147;hp=1196e28bd22f2bcce0459713d53eb108e0157f0c;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54;p=modules%2Fsmesh.git diff --git a/src/Tools/blocFissure/gmu/findWireEndVertices.py b/src/Tools/blocFissure/gmu/findWireEndVertices.py index 1196e28bd..82ea4d62e 100644 --- a/src/Tools/blocFissure/gmu/findWireEndVertices.py +++ b/src/Tools/blocFissure/gmu/findWireEndVertices.py @@ -1,7 +1,28 @@ # -*- 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 +# import logging -from geomsmesh import geompy +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- trouver les vertices extremites d'un wire @@ -39,18 +60,18 @@ def findWireEndVertices(aWire, getNormals=False): normals += [n1, n0] for i, sub in enumerate(vertices): subid = geompy.GetSubShapeID(aWire, sub) - if subid in idsubs.keys(): + if subid in list(idsubs.keys()): idsubs[subid].append(sub) else: idsubs[subid] = [sub] name='vertex%d'%i - geompy.addToStudyInFather(aWire, sub, name) + geomPublishInFather(initLog.debug, aWire, sub, name) if getNormals: idnorm[subid] = normals[i] name='norm%d'%i - geompy.addToStudyInFather(aWire, normals[i], name) + geomPublishInFather(initLog.debug, aWire, normals[i], name) logging.debug("idsubs: %s", idsubs) - for k, v in idsubs.iteritems(): + for k, v in idsubs.items(): if len(v) == 1: shortList.append(v[0]) if getNormals: