Salome HOME
Axis feature in Construction plugin is created
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Axis.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ConstructionPlugin_Axis.h
4 // Created:     12 Dec 2014
5 // Author:      Vitaly Smetannikov
6
7 #ifndef ConstructionPlugin_Axis_H
8 #define ConstructionPlugin_Axis_H
9
10 #include "ConstructionPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAPI_ICustomPrs.h>
13
14
15 /// Point kind
16 const std::string CONSTRUCTION_AXIS_KIND("Axis");
17
18 /// attribute name for first point
19 const std::string POINT_ATTR_FIRST = "firstPoint";
20
21 /// attribute name for second point
22 const std::string POINT_ATTR_SECOND = "secondPoint";
23
24 /**\class ConstructionPlugin_Axis
25  * \ingroup DataModel
26  * \brief Feature for creation of the new axis in PartSet.
27  */
28 class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomPrs
29 {
30  public:
31   /// Returns the kind of a feature
32   CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
33   {
34     static std::string MY_KIND = CONSTRUCTION_AXIS_KIND;
35     return MY_KIND;
36   }
37
38   /// Creates a new part document if needed
39   CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
40
41   /// Request for initialization of data model of the feature: adding all attributes
42   CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
43
44   /// Construction result is allways recomuted on the fly
45   CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
46
47   /// Use plugin manager for features creation
48   ConstructionPlugin_Axis();
49
50   /// Customize presentation of the feature
51   virtual void customisePresentation(AISObjectPtr thePrs);
52 };
53
54
55 #endif