Salome HOME
8816ea4b632d9658bb38748db79b24e0a3e3fade
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintRigid.h
1 // File:    SketchPlugin_ConstraintRigid.h
2 // Created: 13 Oct 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_ConstraintRigid_H_
6 #define SketchPlugin_ConstraintRigid_H_
7
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_ConstraintBase.h"
10 #include <SketchPlugin_Sketch.h>
11 #include <list>
12
13 /** \class SketchPlugin_ConstraintRigid
14  *  \ingroup DataModel
15  *  \brief Feature for creation of a new constraint which defines immovable object
16  *
17  *  This constraint has one attribute:
18  *  SketchPlugin_Constraint::ENTITY_A() (any object, i.e. point, line, circle, arc)
19  */
20 class SketchPlugin_ConstraintRigid : public SketchPlugin_ConstraintBase
21 {
22  public:
23   /// Length constraint kind
24   inline static const std::string& ID()
25   {
26     static const std::string MY_CONSTRAINT_RIGID_ID("SketchConstraintRigid");
27     return MY_CONSTRAINT_RIGID_ID;
28   }
29   /// \brief Returns the kind of a feature
30   SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
31   {
32     static std::string MY_KIND = SketchPlugin_ConstraintRigid::ID();
33     return MY_KIND;
34   }
35
36   /// Returns the AIS preview
37   SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
38
39   /// \brief Creates a new part document if needed
40   SKETCHPLUGIN_EXPORT virtual void execute();
41
42   /// \brief Request for initialization of data model of the feature: adding all attributes
43   SKETCHPLUGIN_EXPORT virtual void initAttributes();
44
45   /// \brief Use plugin manager for features creation
46   SketchPlugin_ConstraintRigid();
47 };
48
49 #endif