Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / src / Tools / blocFissure / gmu / findWireIntermediateVertices.py
index 3b8b40591a38fa1b54f0302a4fb1d0def1275994..42e5ec9fe238973769b5ffac9457f62613db1d9c 100644 (file)
@@ -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 intermediaires d'un wire
@@ -36,17 +39,17 @@ def findWireIntermediateVertices(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)
-  for k, v in idsubs.iteritems():
+        geomPublishInFather(initLog.debug, aWire, normals[i], name)
+  for k, v in idsubs.items():
     if len(v) > 1:
       shortList.append(v[0])
       if getNormals: