From: nds Date: Thu, 7 Apr 2016 13:41:45 +0000 (+0300) Subject: Issue 1299 angle constraint: support of additional and complementary angles: value... X-Git-Tag: V_2.3.0~268 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f9066a9e9a762c7fa8c995d8112f3b3313a3fbc5;p=modules%2Fshaper.git Issue 1299 angle constraint: support of additional and complementary angles: value correction --- diff --git a/src/InitializationPlugin/InitializationPlugin_Plugin.cpp b/src/InitializationPlugin/InitializationPlugin_Plugin.cpp index b37e89ead..7418469e6 100644 --- a/src/InitializationPlugin/InitializationPlugin_Plugin.cpp +++ b/src/InitializationPlugin/InitializationPlugin_Plugin.cpp @@ -48,7 +48,7 @@ void InitializationPlugin_Plugin::processEvent(const std::shared_ptrflush(Events_Loop::eventByName(EVENT_OBJECT_CREATED)); diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index 728d7dfd1..7b60a594c 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -212,7 +212,7 @@ double SketchPlugin_ConstraintAngle::getAngleForType(double theAngle) anAngle = aPositiveNormal ? theAngle : 360 - theAngle; break; case SketcherPrs_Tools::ANGLE_COMPLEMENTARY: - anAngle = 180 - theAngle; + anAngle = fabs(180 - theAngle); break; case SketcherPrs_Tools::ANGLE_BACKWARD: anAngle = aPositiveNormal ? 360 - theAngle : theAngle; diff --git a/src/SketcherPrs/SketcherPrs_Angle.cpp b/src/SketcherPrs/SketcherPrs_Angle.cpp index bd79f8b4b..cbc4b9f82 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.cpp +++ b/src/SketcherPrs/SketcherPrs_Angle.cpp @@ -168,15 +168,13 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP // Angle value is in degrees AttributeDoublePtr aVal = aData->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()); - SetCustomValue(aVal->value() * PI / 180.0); + SetCustomValue(aVal->value()); myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); - AttributeDoublePtr aValue = myConstraint->data()->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()); - SketcherPrs_Tools::setDisplaySpecialSymbol(this, aValue->usedParameters().size() > 0); - - myStyleListener->updateDimensions(this, aValue); + SketcherPrs_Tools::setDisplaySpecialSymbol(this, aVal->usedParameters().size() > 0); + myStyleListener->updateDimensions(this, aVal); AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode); }