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 /**\class ConstructionPlugin_Axis
26 * \brief Feature for creation of the new axis in PartSet.
28 class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomPrs
31 /// Returns the kind of a feature
32 CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind()
34 static std::string MY_KIND = CONSTRUCTION_AXIS_KIND;
38 /// Creates a new part document if needed
39 CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
41 /// Request for initialization of data model of the feature: adding all attributes
42 CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes();
44 /// Construction result is allways recomuted on the fly
45 CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
47 /// Use plugin manager for features creation
48 ConstructionPlugin_Axis();
50 /// Customize presentation of the feature
51 virtual void customisePresentation(AISObjectPtr thePrs);