Salome HOME
Sketch's arcs and circles were added. Constraints for parallel/perpendicular lines...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Point.h
1 // File:    SketchPlugin_Point.h
2 // Created: 07 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_Point_HeaderFile
6 #define SketchPlugin_Point_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_Feature.h"
10 #include <list>
11
12 /// Coordinates of the point
13 const std::string POINT_ATTR_COORD("PointCoordindates");
14
15 /**\class SketchPlugin_Point
16  * \ingroup DataModel
17  * \brief Feature for creation of a new point.
18  */
19 class SketchPlugin_Point: public SketchPlugin_Feature
20 {
21 public:
22   /// Returns the kind of a feature
23   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
24   {static std::string MY_KIND = "SketchPoint"; return MY_KIND;}
25
26   /// 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   /// Creates a new part document if needed
31   SKETCHPLUGIN_EXPORT virtual void execute();
32
33   /// Request for initialization of data model of the feature: adding all attributes
34   SKETCHPLUGIN_EXPORT virtual void initAttributes();
35
36   /// Returns the sketch preview
37   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
38
39   /// Adds sub-feature of the higher level feature (sub-element of the sketch)
40   /// \param theFeature sub-feature
41   SKETCHPLUGIN_EXPORT virtual const void addSub(
42     const boost::shared_ptr<ModelAPI_Feature>& theFeature) {};
43
44   /// Use plugin manager for features creation
45   SketchPlugin_Point();
46 };
47
48 #endif