Salome HOME
Merge branch 'master' of newgeom:newgeom.git into BR_PYTHON_PLUGIN
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCoincidence.h
1 // File:    SketchPlugin_ConstraintCoincidence.h
2 // Created: 08 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_ConstraintCoincidence_H_
6 #define SketchPlugin_ConstraintCoincidence_H_
7
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_ConstraintBase.h"
10 #include <SketchPlugin_Sketch.h>
11 #include <list>
12
13 /** \class SketchPlugin_ConstraintCoincidence
14  *  \ingroup DataModel
15  *  \brief Feature for creation of a new constraint which defines equivalence of two points
16  *
17  *  This constraint has two attributes:
18  *  SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
19  */
20 class SketchPlugin_ConstraintCoincidence : public SketchPlugin_ConstraintBase
21 {
22  public:
23   /// Parallel constraint kind
24   inline static const std::string& ID()
25   {
26     static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence");
27     return MY_CONSTRAINT_COINCIDENCE_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_ConstraintCoincidence::ID();
33     return MY_KIND;
34   }
35
36   /// \brief Creates a new part document if needed
37   SKETCHPLUGIN_EXPORT virtual void execute();
38
39   /// \brief Request for initialization of data model of the feature: adding all attributes
40   SKETCHPLUGIN_EXPORT virtual void initAttributes();
41
42   /// \brief Use plugin manager for features creation
43   SketchPlugin_ConstraintCoincidence();
44 };
45
46 #endif