1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ConstructionPlugin_Point.h
5 // Author: Mikhail PONIKAROV
7 #ifndef ConstructionPlugin_Point_H_
8 #define ConstructionPlugin_Point_H_
10 #include "ConstructionPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAPI_ICustomPrs.h>
16 const std::string CONSTRUCTION_POINT_KIND("Point");
18 /// attribute name for X coordinate
19 const std::string POINT_ATTR_X = "x";
20 /// attribute name for Y coordinate
21 const std::string POINT_ATTR_Y = "y";
22 /// attribute name for Z coordinate
23 const std::string POINT_ATTR_Z = "z";
25 #define CONSTRUCTION_POINT_COLOR "#ffff00"
27 /**\class ConstructionPlugin_Point
29 * \brief Feature for creation of the new part in PartSet.
31 class ConstructionPlugin_Point : public ModelAPI_Feature, public GeomAPI_ICustomPrs
34 /// Returns the kind of a feature
35 CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
37 static std::string MY_KIND = CONSTRUCTION_POINT_KIND;
41 /// Creates a new part document if needed
42 CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
44 /// Request for initialization of data model of the feature: adding all attributes
45 CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
47 /// Construction result is allways recomuted on the fly
48 CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
50 /// Use plugin manager for features creation
51 ConstructionPlugin_Point();
53 /// Modifies the given presentation in the custom way.
54 virtual void customisePresentation(AISObjectPtr thePrs);