From: azv Date: Mon, 3 Apr 2017 11:56:29 +0000 (+0300) Subject: Fix jumping of a circle built by three points X-Git-Tag: V_2.7.0~92 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=86cf314c1ec34383f29d0948c894579de3372b1e;p=modules%2Fshaper.git Fix jumping of a circle built by three points --- 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();