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