]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix of the testing system for the issue #2520 : do not name degenerated edges
authormpv <mikhail.ponikarov@opencascade.com>
Fri, 29 Jun 2018 16:25:14 +0000 (19:25 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Fri, 29 Jun 2018 16:25:14 +0000 (19:25 +0300)
src/PythonAPI/model/tests/tests.py

index ff7ce4dddedba4ee5d7a50b337c0b9d754370673..89a120d10c05823bf2b0c41461610e8f6e0484e0 100644 (file)
@@ -226,15 +226,19 @@ def testHaveNamingByType(theFeature, theModel, thePartDoc, theSubshapeType) :
     shapeExplorer = GeomAPI_ShapeExplorer(shape, theSubshapeType)
     # Create list, and store selections in it
     while shapeExplorer.more():
+      current = shapeExplorer.current()
+      if current.isEdge() and GeomAPI.GeomAPI_Edge(current).isDegenerated(): # skip degenerative edges because they are not selected
+        shapeExplorer.next()
+        continue
       aDuplicate = False
       for alreadyThere in shapesList:
-        if alreadyThere.isSame(shapeExplorer.current()):
+        if alreadyThere.isSame(current):
           aDuplicate = True
       if aDuplicate:
         shapeExplorer.next()
         continue
-      shapesList.append(shapeExplorer.current())
-      selection = theModel.selection(aResult, shapeExplorer.current()) # First argument should be result/sub-result, second is sub-shape on this result/sub-result
+      shapesList.append(current)
+      selection = theModel.selection(aResult, current) # First argument should be result/sub-result, second is sub-shape on this result/sub-result
       selectionList.append(selection)
       shapeExplorer.next()
   # Create group with this selection list