From ec4c89c20d9e981b527288ef230f527e025f4627 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 27 Aug 2015 16:38:30 +0300 Subject: [PATCH] Issue #780: Make Arrow Tail size and extension line size adaptive to current viewer scale --- src/SketcherPrs/SketcherPrs_Angle.cpp | 3 +++ src/SketcherPrs/SketcherPrs_LengthDimension.cpp | 3 +++ src/SketcherPrs/SketcherPrs_Radius.cpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/SketcherPrs/SketcherPrs_Angle.cpp b/src/SketcherPrs/SketcherPrs_Angle.cpp index fbdb47391..8603dd444 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.cpp +++ b/src/SketcherPrs/SketcherPrs_Angle.cpp @@ -106,6 +106,9 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP AttributeDoublePtr aVal = aData->real(SketchPlugin_Constraint::VALUE()); SetCustomValue(aVal->value() * PI / 180.0); + myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); + myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); + AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode); } diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp index ea58e6515..347d8b12c 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp @@ -55,6 +55,9 @@ void SketcherPrs_LengthDimension::Compute(const Handle(PrsMgr_PresentationManage gp_Pnt aPnt1, aPnt2; if (!getPoints(aPnt1, aPnt2)) return; + myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); + myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); + SetFlyout(SketcherPrs_Tools::getFlyoutDistance(myConstraint)); SetMeasuredGeometry(aPnt1, aPnt2, myPlane->impl()); AIS_LengthDimension::Compute(thePresentationManager, thePresentation, theMode); diff --git a/src/SketcherPrs/SketcherPrs_Radius.cpp b/src/SketcherPrs/SketcherPrs_Radius.cpp index a99bdc9af..6fc31d0d5 100644 --- a/src/SketcherPrs/SketcherPrs_Radius.cpp +++ b/src/SketcherPrs/SketcherPrs_Radius.cpp @@ -87,6 +87,9 @@ void SketcherPrs_Radius::Compute(const Handle(PrsMgr_PresentationManager3d)& the SetMeasuredGeometry(aCircle.impl(), anAnchor->impl()); SetCustomValue(aRadius); + myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length()); + myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length()); + AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode); } -- 2.39.2