From: skv Date: Fri, 19 Jun 2015 07:51:17 +0000 (+0300) Subject: 0022776: [CEA 1269] Project a wire or a face on a cylinder: rm instability in RemoveE... X-Git-Tag: V7_7_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29ae7886c0ea9073341d0cd28c492ffe47835099;p=modules%2Fgeom.git 0022776: [CEA 1269] Project a wire or a face on a cylinder: rm instability in RemoveExtraEdges --- diff --git a/src/BlockFix/BlockFix_UnionFaces.cxx b/src/BlockFix/BlockFix_UnionFaces.cxx index c1b56f260..c1788bbb1 100644 --- a/src/BlockFix/BlockFix_UnionFaces.cxx +++ b/src/BlockFix/BlockFix_UnionFaces.cxx @@ -138,8 +138,9 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges, { //map of edges TopTools_MapOfShape aNewEdges; + TopExp_Explorer exp(aShape,TopAbs_EDGE); //add edges without seams - for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) { + for(; exp.More(); exp.Next()) { TopoDS_Shape edge = exp.Current(); if(aNewEdges.Contains(edge)) aNewEdges.Remove(edge); @@ -164,9 +165,14 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges, } } - //add edges to the sequemce - for(TopTools_MapIteratorOfMapOfShape anIter(aNewEdges); anIter.More(); anIter.Next()) - edges.Append(anIter.Key()); + //add edges to the sequence + for(exp.ReInit(); exp.More(); exp.Next()) { + const TopoDS_Shape &anEdge = exp.Current(); + + if (aNewEdges.Contains(anEdge)) { + edges.Append(anEdge); + } + } return isDropped; }