From: mpv Date: Thu, 13 Aug 2015 06:55:35 +0000 (+0300) Subject: Issue #719: taking into account that edges may lay on the same circle, but splitted... X-Git-Tag: V_1.4.0_beta4~394 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5c95c92510111cb79b244390964240d966efb1c4;p=modules%2Fshaper.git Issue #719: taking into account that edges may lay on the same circle, but splitted in the point param=0 --- 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);