]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
http://www.salome-platform.org/forum/forum_11/173031193
authoreap <eap@opencascade.com>
Tue, 26 Nov 2013 12:16:47 +0000 (12:16 +0000)
committereap <eap@opencascade.com>
Tue, 26 Nov 2013 12:16:47 +0000 (12:16 +0000)
Fix associating FACEs having degenerated EDGEs

src/StdMeshers/StdMeshers_ProjectionUtils.cxx

index 4bb4352141b1ed7c398c6ae1616e24e4edc6e804..262c92507de9fe45e8bbda35bb757ed810f62d64 100644 (file)
@@ -1332,9 +1332,15 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
           CONT_BAD_RESULT("GetOrderedEdges() failed");
       }
     }
-    edgeIt = --edges2.end();
     if ( !VV2[1].IsSame( TopExp::LastVertex( edges2.front(), true ))) {
       reverse = !reverse;
+      edgeIt = --edges2.end();
+      // move a degenerated edge from back to front
+      // http://www.salome-platform.org/forum/forum_11/173031193
+      if ( TopExp::FirstVertex( *edgeIt ).IsSame( TopExp::LastVertex( *edgeIt ))) {
+        edges2.splice( edges2.begin(), edges2, edgeIt );
+        edgeIt = --edges2.end();
+      }
       // check if the second vertex belongs to the first or last edge in the wire
       if ( !VV2[1].IsSame( TopExp::FirstVertex( *edgeIt, true ))) {
         bool KO = true; // belongs to none