Salome HOME
Color preferences for the imported feature.
[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 #define CONSTRUCTION_AXIS_COLOR "#000000"
25
26 /**\class ConstructionPlugin_Axis
27  * \ingroup Plugins
28  * \brief Feature for creation of the new axis in PartSet.
29  */
30 class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomPrs
31 {
32  public:
33   /// Returns the kind of a feature
34   CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
35   {
36     static std::string MY_KIND = CONSTRUCTION_AXIS_KIND;
37     return MY_KIND;
38   }
39
40   /// Creates a new part document if needed
41   CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
42
43   /// Request for initialization of data model of the feature: adding all attributes
44   CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
45
46   /// Construction result is allways recomuted on the fly
47   CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
48
49   /// Use plugin manager for features creation
50   ConstructionPlugin_Axis();
51
52   /// Customize presentation of the feature
53   virtual void customisePresentation(AISObjectPtr thePrs);
54 };
55
56
57 #endif