From: azv Date: Sat, 1 Apr 2017 13:50:54 +0000 (+0300) Subject: Initialize parameter of SketchPlugin_Arc on execute() to avoid its reverting X-Git-Tag: V_2.7.0~107 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5778f7c42a66027e7dd2f0b967babb9e9b1111c0;p=modules%2Fshaper.git Initialize parameter of SketchPlugin_Arc on execute() to avoid its reverting --- diff --git a/src/SketchPlugin/SketchPlugin_Arc.cpp b/src/SketchPlugin/SketchPlugin_Arc.cpp index 0dac256a8..ca7579d86 100644 --- a/src/SketchPlugin/SketchPlugin_Arc.cpp +++ b/src/SketchPlugin/SketchPlugin_Arc.cpp @@ -103,6 +103,12 @@ void SketchPlugin_Arc::execute() GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, anEnd, aStart, aNormal) : GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, aStart, anEnd, aNormal); + if (myParamBefore == 0) { // parameter has not been calculate yet + std::shared_ptr aCircleForArc( + new GeomAPI_Circ2d(aCenterAttr->pnt(), aStartAttr->pnt())); + aCircleForArc->parameter(anEndAttr->pnt(), paramTolerance, myParamBefore); + } + std::shared_ptr aResult = document()->createConstruction(data(), 1); aResult->setShape(anArcShape); aResult->setIsInHistory(false);