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