#include <SketchPlugin_Point.h>
#include <SketchPlugin_Circle.h>
-#include <Events_Error.h>
-
#include <GeomDataAPI_Point2D.h>
#include <GeomAPI_Pnt.h>
#include <GeomAPI_XYZ.h>
const std::shared_ptr<GeomAPI_Ax3>& thePlane)
: AIS_LengthDimension(MyDefStart, MyDefEnd, MyDefPln),
myConstraint(theConstraint),
- mySketcherPlane(thePlane)
+ mySketcherPlane(thePlane),
+ myFirstPoint(MyDefStart),
+ mySecondPoint(MyDefEnd),
+ myPlane(MyDefPln),
+ myDistance(1),
+ myValue(0., false, "")
{
SetDimensionAspect(SketcherPrs_Tools::createDimensionAspect());
SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
myDistance = SketcherPrs_Tools::getFlyoutDistance(myConstraint);
myPlane = gp_Pln(mySketcherPlane->impl<gp_Ax3>());
- AttributeDoublePtr anAttributeValue = myConstraint->data()->real(SketchPlugin_Constraint::VALUE());
-
- myHasParameters = anAttributeValue->usedParameters().size() > 0;
- myValue = anAttributeValue->text();
+ DataPtr aData = myConstraint->data();
+ AttributeDoublePtr anAttributeValue = aData->real(SketchPlugin_Constraint::VALUE());
+ myValue.init(anAttributeValue);
}
// compute flyout distance
SketcherPrs_Tools::updateArrows(DimensionAspect(), GetValue(), aTextSize);
// Update text visualization: parameter value or parameter text
- myStyleListener->updateDimensions(this, myHasParameters, myValue);
+ myStyleListener->updateDimensions(this, myValue);
AIS_LengthDimension::Compute(thePresentationManager, thePresentation, theMode);