Salome HOME
Color preferences for the imported feature.
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plane.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ConstructionPlugin_Plane.h
4 // Created:     12 Dec 2014
5 // Author:      Vitaly Smetannikov
6
7 #ifndef ConstructionPlugin_Plane_H
8 #define ConstructionPlugin_Plane_H
9
10 #include "ConstructionPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAPI_ICustomPrs.h>
13
14 /// Point kind
15 const std::string CONSTRUCTION_PLANE_KIND("Plane");
16
17 /// attribute name for base face
18 const std::string FACE_ATTR = "planeFace";
19
20 /// attribute name for distance
21 const std::string DISTANCE_ATTR = "distance";
22
23 /**\class ConstructionPlugin_Plane
24  * \ingroup Plugins
25  * \brief Feature for creation of the new planar surface in PartSet.
26  */
27 #define CONSTRUCTION_PLANE_COLOR "#32FF32"
28
29
30 class ConstructionPlugin_Plane : 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_PLANE_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_Plane();
51
52   /// Customize presentation of the feature
53   virtual void customisePresentation(AISObjectPtr thePrs);
54 };
55
56 #endif