24 #ifndef SketchPlugin_ConstraintDistanceAlongDir_H_
25 #define SketchPlugin_ConstraintDistanceAlongDir_H_
27 #include <SketchPlugin.h>
28 #include <SketchPlugin_ConstraintDistance.h>
46 static const std::string MY_LOCATION_TYPE_ID(
"LocationType");
47 return MY_LOCATION_TYPE_ID;
53 static const std::string& MY_DISTANCE_VALUE(
"DistanceValue");
54 return MY_DISTANCE_VALUE;
60 static const std::string MY_NEGATIVE_VALUE(
"NegativeValue");
61 return MY_NEGATIVE_VALUE;
65 SKETCHPLUGIN_EXPORT
virtual void execute();
71 SKETCHPLUGIN_EXPORT
virtual AISObjectPtr
getAISObject(AISObjectPtr thePrevious);
std::shared_ptr< ModelAPI_AttributeDouble > real(const std::string &theID)
Returns the real attribute by the identifier.
Definition: ModelAPI_Feature.h:211
Feature for creation of a new constraint which defines a distance along direction.
Definition: SketchPlugin_ConstraintDistanceAlongDir.h:41
SketchPlugin_ConstraintDistanceAlongDir()
Use plugin manager for features creation.
Definition: SketchPlugin_ConstraintDistanceAlongDir.cpp:44
virtual void updateFlyoutPoint()=0
Update flyout point.
virtual SKETCHPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: SketchPlugin_ConstraintDistanceAlongDir.cpp:52
virtual SKETCHPLUGIN_EXPORT AISObjectPtr getAISObject(AISObjectPtr thePrevious)
Returns the AIS preview.
Definition: SketchPlugin_ConstraintDistanceAlongDir.cpp:86
double getNumericValue() override
Get numeric value of attribute DISTANCE_VALUE_ID()
Definition: SketchPlugin_ConstraintDistanceAlongDir.h:82
virtual SKETCHPLUGIN_EXPORT void execute()
Creates a new part document if needed.
Definition: SketchPlugin_ConstraintDistanceAlongDir.cpp:75
static const std::string & DISTANCE_VALUE_ID()
attribute name of the distance value shown to the user
Definition: SketchPlugin_ConstraintDistanceAlongDir.h:51
virtual double calculateCurrentDistance()=0
Returns the current distance between the feature attributes.
static const std::string & NEGATIVE_TYPE_ID()
attribute name of the sign of distance
Definition: SketchPlugin_ConstraintDistanceAlongDir.h:58
static const std::string & LOCATION_TYPE_ID()
attribute name of dimension location type
Definition: SketchPlugin_ConstraintDistanceAlongDir.h:44
void setNumericValue(const double theValue) override
Set numeric value to attribute DISTANCE_VALUE_ID()
Definition: SketchPlugin_ConstraintDistanceAlongDir.cpp:158
virtual SKETCHPLUGIN_EXPORT void attributeChanged(const std::string &theID)
Called on change of any argument-attribute of this object.
Definition: SketchPlugin_ConstraintDistanceAlongDir.cpp:100
Feature for creation of a new constraint which defines a distance between a point and another feature...
Definition: SketchPlugin_ConstraintDistance.h:44