X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Block.cxx;h=c84d6413cb158153ef6dd4855e5ae4f6e75ba4be;hb=331cc524a8e943bb1d1b008b30848308d06ce0e0;hp=821d8fa9f7940c3208bcad592856a7a297e86abd;hpb=2daa321efae3d0c6ce41199fa5a2482630d505d9;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Block.cxx b/src/SMESH/SMESH_Block.cxx index 821d8fa9f..c84d6413c 100644 --- a/src/SMESH/SMESH_Block.cxx +++ b/src/SMESH/SMESH_Block.cxx @@ -981,10 +981,13 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace, TopoDS_Wire anOuterWire = theShapeAnalysisAlgo ? ShapeAnalysis::OuterWire( theFace ) : BRepTools::OuterWire( theFace ); for ( TopoDS_Iterator wIt (theFace); wIt.More(); wIt.Next() ) - if ( !anOuterWire.IsSame( wIt.Value() )) - aWireList.push_back( TopoDS::Wire( wIt.Value() )); - else - aWireList.push_front( TopoDS::Wire( wIt.Value() )); + if ( wIt.Value().ShapeType() == TopAbs_WIRE ) // it can be internal vertex! + { + if ( !anOuterWire.IsSame( wIt.Value() )) + aWireList.push_back( TopoDS::Wire( wIt.Value() )); + else + aWireList.push_front( TopoDS::Wire( wIt.Value() )); + } // loop on edges of wires theNbVertexInWires.clear(); @@ -1000,6 +1003,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