From 5c95c92510111cb79b244390964240d966efb1c4 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 13 Aug 2015 09:55:35 +0300 Subject: [PATCH] Issue #719: taking into account that edges may lay on the same circle, but splitted in the point param=0 --- src/Model/Model_AttributeSelection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 4457c08af..f3f4d27a3 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -391,11 +391,15 @@ bool Model_AttributeSelection::update() TopoDS_Face aFace = TopoDS::Face(aConstructionContext->face(aFaceIndex)->impl()); TopExp_Explorer anEdgesExp(aFace, TopAbs_EDGE); + TColStd_MapOfTransient alreadyProcessed; // to avoid counting edges with same curved (841) for(; anEdgesExp.More(); anEdgesExp.Next()) { TopoDS_Edge anEdge = TopoDS::Edge(anEdgesExp.Current()); if (!anEdge.IsNull()) { Standard_Real aFirst, aLast; Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aFirst, aLast); + if (alreadyProcessed.Contains(aCurve)) + continue; + alreadyProcessed.Add(aCurve); if (allCurves.IsBound(aCurve)) { aFound++; int anOrient = allCurves.Find(aCurve); -- 2.39.2