]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2148: Moving an arc displays a circle
authorazv <azv@opencascade.com>
Thu, 4 May 2017 11:52:14 +0000 (14:52 +0300)
committerazv <azv@opencascade.com>
Thu, 4 May 2017 11:52:14 +0000 (14:52 +0300)
Force recalculating arc parameter when it is became a full circle.

src/SketchPlugin/SketchPlugin_Arc.cpp

index e818241d0859a98687e7829fa6374e6a46703f8a..fd361708f75a56ac4b00f610c93db67cdb68cb3f 100644 (file)
@@ -106,9 +106,10 @@ void SketchPlugin_Arc::execute()
   }
 
   GeomShapePtr anArcShape;
-  if (fabs(myParamBefore - 2.0 * PI) < paramTolerance)
+  if (fabs(myParamBefore - 2.0 * PI) < paramTolerance) {
     anArcShape = GeomAlgoAPI_EdgeBuilder::lineCircle(aCenter, aNormal, aStart->distance(aCenter));
-  else {
+    myParamBefore = 0;
+  } else {
     anArcShape = boolean(REVERSED_ID())->value() ?
       GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, anEnd, aStart, aNormal)
     : GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, aStart, anEnd, aNormal);