]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2205 Ability to customize the arrows and texts of dimensions: angle - correct...
authornds <nds@opencascade.com>
Thu, 16 Nov 2017 08:29:19 +0000 (11:29 +0300)
committernds <nds@opencascade.com>
Thu, 16 Nov 2017 08:29:19 +0000 (11:29 +0300)
src/SketcherPrs/SketcherPrs_Angle.cpp

index 9521f1db16133c227038ec3b31774bb5de21e722..d1735600bd935f063824ce95a6954cb9cce69d59 100644 (file)
@@ -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);