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