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