Salome HOME
It replaces using of direct value "Sketch" to SKETCH_KIND, which is defined in the...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintDistance.h
1 // File:    SketchPlugin_ConstraintDistance.h
2 // Created: 23 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_ConstraintDistance_HeaderFile
6 #define SketchPlugin_ConstraintDistance_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_Constraint.h"
10 #include <SketchPlugin_Sketch.h>
11 #include <list>
12
13
14 /** \class SketchPlugin_ConstraintDistance
15  *  \ingroup DataModel
16  *  \brief Feature for creation of a new constraint which defines a distance
17  *         between a point and another feature (point, line, plane or face)
18  *
19  *  These constraint has three attributes:
20  *  CONSTRAINT_ATTR_VALUE, CONSTRAINT_ATTR_ENTITY_A and CONSTRAINT_ATTR_ENTITY_B
21  */
22 class SketchPlugin_ConstraintDistance: public SketchPlugin_Constraint
23 {
24 public:
25   /// \brief Returns the kind of a feature
26   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
27   {static std::string MY_KIND = "SketchConstraintDistance"; return MY_KIND;}
28
29   /// \brief Returns to which group in the document must be added feature
30   SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() 
31   {static std::string MY_GROUP = SKETCH_KIND; return MY_GROUP;}
32
33   /// \brief Creates a new part document if needed
34   SKETCHPLUGIN_EXPORT virtual void execute();
35
36   /// \brief Request for initialization of data model of the feature: adding all attributes
37   SKETCHPLUGIN_EXPORT virtual void initAttributes();
38
39   /// \brief Returns the sketch preview
40   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
41
42   /// \brief Use plugin manager for features creation
43   SketchPlugin_ConstraintDistance();
44 };
45
46 #endif