Salome HOME
0020676: EDF 1212 GEOM: Partition operation creates vertices which causes mesh comput...
authoreap <eap@opencascade.com>
Thu, 11 Feb 2010 08:25:06 +0000 (08:25 +0000)
committereap <eap@opencascade.com>
Thu, 11 Feb 2010 08:25:06 +0000 (08:25 +0000)
* Fix GetOrderedEdges(): workaroud for BRepTools_WireExplorer, which return no edges if they are internal

src/SMESH/SMESH_Block.cxx

index 821d8fa9f7940c3208bcad592856a7a297e86abd..14b373536fb3ef31c13a0d274f69e4166c1229b9 100644 (file)
@@ -1000,6 +1000,11 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face&   theFace,
       // edge = TopoDS::Edge( edge.Oriented( wExp.Orientation() ));
       theEdges.push_back( edge );
     }
+    if ( iE == 0 ) // wExp returns nothing if e.g. the wire contains one internal edge
+    { // Issue 0020676
+      for ( TopoDS_Iterator e( *wlIt ); e.More(); e.Next(), ++iE )
+        theEdges.push_back( TopoDS::Edge( e.Value() ));
+    }
     theNbVertexInWires.push_back( iE );
     iE = 0;
     if ( wlIt == aWireList.begin() && theEdges.size() > 1 ) { // the outer wire