#include "SketcherPrs_Angle.h"
#include "SketcherPrs_Tools.h"
+#include "SketcherPrs_DimensionStyleListener.h"
#include <SketchPlugin_ConstraintAngle.h>
#include <SketchPlugin_Constraint.h>
SetDimensionAspect(myAspect);
SetSelToleranceForText2d(SketcherPrs_Tools::getDefaultTextHeight());
+
+ myStyleListener = new SketcherPrs_DimensionStyleListener();
+}
+
+SketcherPrs_Angle::~SketcherPrs_Angle()
+{
+ delete myStyleListener;
}
bool SketcherPrs_Angle::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
AttributeDoublePtr aValue = myConstraint->data()->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
SketcherPrs_Tools::setDisplaySpecialSymbol(this, aValue->usedParameters().size() > 0);
+ myStyleListener->updateDimensions(this, aValue);
+
AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode);
}
#include <AIS_AngleDimension.hxx>
#include <Standard_DefineHandle.hxx>
+class SketcherPrs_DimensionStyleListener;
+
DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension)
/**
Standard_EXPORT SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane);
+ /// Destructor
+ Standard_EXPORT ~SketcherPrs_Angle();
+
DEFINE_STANDARD_RTTI(SketcherPrs_Angle)
/// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
std::shared_ptr<GeomAPI_Ax3> myPlane;
Handle(Prs3d_DimensionAspect) myAspect;
+
+ /// Listener to update dimension visualization style
+ SketcherPrs_DimensionStyleListener* myStyleListener;
};
#include "SketcherPrs_LengthDimension.h"
#include "SketcherPrs_Tools.h"
+#include "SketcherPrs_Tools.h"
+#include "SketcherPrs_DimensionStyleListener.h"
#include <SketchPlugin_Constraint.h>
#include <SketchPlugin_ConstraintLength.h>
#include <SketchPlugin_Point.h>
#include <SketchPlugin_Circle.h>
-#include <SketcherPrs_Tools.h>
-#include <SketcherPrs_DimensionStyleListener.h>
-
#include <Events_Error.h>
#include <Events_Loop.h>
#include "SketcherPrs_Radius.h"
#include "SketcherPrs_Tools.h"
+#include "SketcherPrs_DimensionStyleListener.h"
#include <SketchPlugin_ConstraintRadius.h>
#include <SketchPlugin_Constraint.h>
SetDimensionAspect(myAspect);
SetSelToleranceForText2d(SketcherPrs_Tools::getDefaultTextHeight());
+
+ myStyleListener = new SketcherPrs_DimensionStyleListener();
+}
+
+SketcherPrs_Radius::~SketcherPrs_Radius()
+{
+ delete myStyleListener;
}
bool SketcherPrs_Radius::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
AttributeDoublePtr aValue = myConstraint->data()->real(SketchPlugin_Constraint::VALUE());
SketcherPrs_Tools::setDisplaySpecialSymbol(this, aValue->usedParameters().size() > 0);
+ myStyleListener->updateDimensions(this, aValue);
+
AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
}
#include <AIS_RadiusDimension.hxx>
#include <Standard_DefineHandle.hxx>
+class SketcherPrs_DimensionStyleListener;
+
DEFINE_STANDARD_HANDLE(SketcherPrs_Radius, AIS_RadiusDimension)
/**
Standard_EXPORT SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
const std::shared_ptr<GeomAPI_Ax3>& thePlane);
+ /// Destructor
+ Standard_EXPORT ~SketcherPrs_Radius();
+
DEFINE_STANDARD_RTTI(SketcherPrs_Radius)
/// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
std::shared_ptr<GeomAPI_Ax3> myPlane;
Handle(Prs3d_DimensionAspect) myAspect;
+
+ /// Listener to update dimension visualization style
+ SketcherPrs_DimensionStyleListener* myStyleListener;
};
#endif
\ No newline at end of file