1 // File: SketchPlugin_ConstraintRigid.h
2 // Created: 13 Oct 2014
3 // Author: Artem ZHIDKOV
5 #ifndef SketchPlugin_ConstraintRigid_H_
6 #define SketchPlugin_ConstraintRigid_H_
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_ConstraintBase.h"
10 #include <SketchPlugin_Sketch.h>
13 /** \class SketchPlugin_ConstraintRigid
15 * \brief Feature for creation of a new constraint which defines immovable object
17 * This constraint has one attribute:
18 * SketchPlugin_Constraint::ENTITY_A() (any object, i.e. point, line, circle, arc)
20 class SketchPlugin_ConstraintRigid : public SketchPlugin_ConstraintBase
23 /// Length constraint kind
24 inline static const std::string& ID()
26 static const std::string MY_CONSTRAINT_RIGID_ID("SketchConstraintRigid");
27 return MY_CONSTRAINT_RIGID_ID;
29 /// \brief Returns the kind of a feature
30 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
32 static std::string MY_KIND = SketchPlugin_ConstraintRigid::ID();
36 /// Returns the AIS preview
37 SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
39 /// \brief Creates a new part document if needed
40 SKETCHPLUGIN_EXPORT virtual void execute();
42 /// \brief Request for initialization of data model of the feature: adding all attributes
43 SKETCHPLUGIN_EXPORT virtual void initAttributes();
45 /// \brief Use plugin manager for features creation
46 SketchPlugin_ConstraintRigid();