1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ConstructionPlugin_Axis.h
4 // Created: 12 Dec 2014
5 // Author: Vitaly Smetannikov
7 #ifndef ConstructionPlugin_Axis_H
8 #define ConstructionPlugin_Axis_H
10 #include "ConstructionPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAPI_ICustomPrs.h>
16 const std::string CONSTRUCTION_AXIS_KIND("Axis");
18 /// attribute name for first point
19 const std::string POINT_ATTR_FIRST = "firstPoint";
21 /// attribute name for second point
22 const std::string POINT_ATTR_SECOND = "secondPoint";
24 #define CONSTRUCTION_AXIS_COLOR "#000000"
26 /**\class ConstructionPlugin_Axis
28 * \brief Feature for creation of the new axis in PartSet.
30 class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomPrs
33 /// Returns the kind of a feature
34 CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
36 static std::string MY_KIND = CONSTRUCTION_AXIS_KIND;
40 /// Creates a new part document if needed
41 CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
43 /// Request for initialization of data model of the feature: adding all attributes
44 CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
46 /// Construction result is allways recomuted on the fly
47 CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
49 /// Use plugin manager for features creation
50 ConstructionPlugin_Axis();
52 /// Customize presentation of the feature
53 virtual void customisePresentation(AISObjectPtr thePrs);