From 86cf314c1ec34383f29d0948c894579de3372b1e Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 3 Apr 2017 14:56:29 +0300 Subject: [PATCH] Fix jumping of a circle built by three points --- src/SketchPlugin/SketchPlugin_MacroCircle.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_MacroCircle.cpp b/src/SketchPlugin/SketchPlugin_MacroCircle.cpp index b14bc1420..e0c178ddd 100644 --- a/src/SketchPlugin/SketchPlugin_MacroCircle.cpp +++ b/src/SketchPlugin/SketchPlugin_MacroCircle.cpp @@ -256,15 +256,15 @@ void SketchPlugin_MacroCircle::fillByThreePoints() if (aPassedPoint) aCircBuilder.addPassingPoint(aPassedPoint); - else + else { aCircBuilder.addTangentCurve(aTangentCurve); + AttributePoint2DPtr aPassedPoint = + std::dynamic_pointer_cast(aPassedAttr); + if (aPassedPoint) + aCircBuilder.setClosestPoint(aPassedPoint->pnt()); + } } - AttributePoint2DPtr aThirdPoint = - std::dynamic_pointer_cast(attribute(THIRD_POINT_ID())); - if (aThirdPoint) - aCircBuilder.setClosestPoint(aThirdPoint->pnt()); - std::shared_ptr aCircle = aCircBuilder.circle(); if (aCircle) { myCenter = aCircle->center(); -- 2.39.2