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