From c85443b368b75c695ecabdf7e903c46e4fd1db2d Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 16 Nov 2017 11:29:19 +0300 Subject: [PATCH] Issue #2205 Ability to customize the arrows and texts of dimensions: angle - correct positioning for automatic case. --- src/SketcherPrs/SketcherPrs_Angle.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SketcherPrs/SketcherPrs_Angle.cpp b/src/SketcherPrs/SketcherPrs_Angle.cpp index 9521f1db1..d1735600b 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.cpp +++ b/src/SketcherPrs/SketcherPrs_Angle.cpp @@ -243,7 +243,13 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP (myConstraint->data()->attribute(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID())); SketcherPrs_Tools::LocationType aLocationType = aLocAttr->isInitialized() ? (SketcherPrs_Tools::LocationType)(aLocAttr->value()) : SketcherPrs_Tools::LOCATION_AUTOMATIC; - updateArrows(myAspect, GetValue(), aTextSize, aLocationType); + + double aRadius = myCenterPoint.Translated( + gp_Vec(myCenterPoint, myFirstPoint).Normalized()*aDist).Distance(myCenterPoint); + double anAngleValue = myValue.myDoubleValue; + double anAngleCircleLength = aRadius * anAngleValue * PI / 180.; + + updateArrows(myAspect, anAngleCircleLength, aTextSize, aLocationType); AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode); -- 2.39.2