From: nds Date: Thu, 16 Nov 2017 08:29:19 +0000 (+0300) Subject: Issue #2205 Ability to customize the arrows and texts of dimensions: angle - correct... X-Git-Tag: V_2.10.0RC~160 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c85443b368b75c695ecabdf7e903c46e4fd1db2d;p=modules%2Fshaper.git Issue #2205 Ability to customize the arrows and texts of dimensions: angle - correct positioning for automatic case. --- 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);