]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #719: taking into account that edges may lay on the same circle, but splitted...
authormpv <mpv@opencascade.com>
Thu, 13 Aug 2015 06:55:35 +0000 (09:55 +0300)
committermpv <mpv@opencascade.com>
Thu, 13 Aug 2015 06:55:35 +0000 (09:55 +0300)
src/Model/Model_AttributeSelection.cpp

index 4457c08afba2465019076ba435ea31022ba005d4..f3f4d27a3c46d34ea92dfa5c3577716004bee615 100644 (file)
@@ -391,11 +391,15 @@ bool Model_AttributeSelection::update()
             TopoDS_Face aFace = 
               TopoDS::Face(aConstructionContext->face(aFaceIndex)->impl<TopoDS_Shape>());
             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);