From: azv Date: Wed, 31 Aug 2016 08:32:35 +0000 (+0300) Subject: Fix reversing of the angle while executing dumped python script X-Git-Tag: V_2.5.0~101 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=67c69ab77ee3483f3d805804a78815e98f010b5f;p=modules%2Fshaper.git Fix reversing of the angle while executing dumped python script --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index 2bf082f61..219f684ea 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -228,7 +228,8 @@ void SketchPlugin_ConstraintAngle::updateConstraintValueByAngleValue() /// an angle value should be corrected by the current angle type aValueAttr = std::dynamic_pointer_cast< ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE())); - anAngle = getAngleForType(anAngle, aValueAttr->value() > 180.0); + bool isObtuse = aValueAttr->isInitialized() && aValueAttr->value() > 180.0; + anAngle = getAngleForType(anAngle, isObtuse); aValueAttr->setValue(anAngle); }