X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FfindWireEndVertices.py;h=be9b34736253b6ec52593cc60ac0a8328fc978ec;hp=1196e28bd22f2bcce0459713d53eb108e0157f0c;hb=442fd64c19a6e27a339ca36264c15ec91732cf32;hpb=072a73120b6db7bba2389aa7ada0cde20e22ee57 diff --git a/src/Tools/blocFissure/gmu/findWireEndVertices.py b/src/Tools/blocFissure/gmu/findWireEndVertices.py index 1196e28bd..be9b34736 100644 --- a/src/Tools/blocFissure/gmu/findWireEndVertices.py +++ b/src/Tools/blocFissure/gmu/findWireEndVertices.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- 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 +42,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: