1 // File: SketchPlugin_ConstraintCoincidence.h
2 // Created: 08 May 2014
3 // Author: Artem ZHIDKOV
5 #ifndef SketchPlugin_ConstraintCoincidence_HeaderFile
6 #define SketchPlugin_ConstraintCoincidence_HeaderFile
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_Constraint.h"
13 /** \class SketchPlugin_ConstraintCoincidence
15 * \brief Feature for creation of a new constraint which defines equvalence of two points
17 * These constraint has two attributes: CONSTRAINT_ATTR_POINT_A and CONSTRAINT_ATTR_POINT_B
19 class SketchPlugin_ConstraintCoincidence: public SketchPlugin_Constraint
22 /// \brief Returns the kind of a feature
23 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
24 {static std::string MY_KIND = "SketchConstraintCoincidence"; return MY_KIND;}
26 /// \brief Returns to which group in the document must be added feature
27 SKETCHPLUGIN_EXPORT virtual const std::string& getGroup()
28 {static std::string MY_GROUP = "Sketch"; return MY_GROUP;}
30 /// \brief Creates a new part document if needed
31 SKETCHPLUGIN_EXPORT virtual void execute();
33 /// \brief Request for initialization of data model of the feature: adding all attributes
34 SKETCHPLUGIN_EXPORT virtual void initAttributes();
36 /// \brief Returns the sketch preview
37 SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
39 /// \brief Use plugin manager for features creation
40 SketchPlugin_ConstraintCoincidence();