Salome HOME
Adjust the big models according to new naming
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Angle.cpp
index 9521f1db16133c227038ec3b31774bb5de21e722..c8f79b464d7f1b696f4b4a56cf0b1e8fc69688cc 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);
 
@@ -275,7 +281,7 @@ void SketcherPrs_Angle::ComputeSelection(const Handle(SelectMgr_Selection)& aSel
     return;
   }
   }
-  SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+  SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
   AIS_AngleDimension::ComputeSelection(aSelection, aMode);
 }