#include <TopExp.hxx>
#include <BRep_Tool.hxx>
-#include <Events_Error.h>
-
#define PI 3.1415926535897932
IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension);
: AIS_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)), myConstraint(theConstraint),
mySketcherPlane(thePlane),
myFirstPoint(gp_Pnt(0,0,0)), myCenterPoint(gp_Pnt(1,0,0)), mySecondPoint(gp_Pnt(0,1,0)),
- myAngle(90), myValue("90"), myFlyOutPoint(0, 0.5, 0)
+ myValue(90., false, ""), myFlyOutPoint(0, 0.5, 0)
{
myAspect = new Prs3d_DimensionAspect();
myAspect->MakeArrows3d(false);
myCenterPoint = aCenterPoint;
DataPtr aData = myConstraint->data();
- AttributeDoublePtr aVal = aData->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
- myAngle = aVal->value();
- myValue = aVal->text();
+ AttributeDoublePtr anAttributeValue = aData->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
+ myValue.init(anAttributeValue);
std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr =
std::dynamic_pointer_cast<GeomDataAPI_Point2D>
aDist = calculateDistanceToFlyoutPoint();
SetFlyout(aDist);
- // Angle value is in degrees
- SetCustomValue(myAngle);
+ // Update text visualization: parameter value or parameter text
+ myStyleListener->updateDimensions(this, myValue);
myAspect->SetExtensionSize(myAspect->ArrowAspect()->Length());
myAspect->SetArrowTailSize(myAspect->ArrowAspect()->Length());
- // Update text visualization: parameter value or parameter text
- myStyleListener->updateDimensions(this, myHasParameters, myValue);
-
AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay)