1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D
3 // File: PrimitivesPlugin_Cone.h
4 // Created: 17 Mar 2017
5 // Author: Clarisse Genrault (CEA)
7 #ifndef PRIMITIVESPLUGIN_CONE_H_
8 #define PRIMITIVESPLUGIN_CONE_H_
10 #include <PrimitivesPlugin.h>
11 #include <ModelAPI_Feature.h>
12 #include <GeomAlgoAPI_Cone.h>
14 /**\class PrimitivesPlugin_Cone
16 * \brief Feature for creation of a cone.
18 * Creates a cone from a
20 class PrimitivesPlugin_Cone : public ModelAPI_Feature
24 inline static const std::string& ID()
26 static const std::string MY_CONE_ID("Cone");
30 /// Attribute name of the base point
31 inline static const std::string& BASE_POINT_ID()
33 static const std::string MY_BASE_POINT_ID("base_point");
34 return MY_BASE_POINT_ID;
37 /// Attribute name of the axis
38 inline static const std::string& AXIS_ID()
40 static const std::string MY_AXIS_ID("axis");
44 /// Attribute name of the base radius
45 inline static const std::string& BASE_RADIUS_ID()
47 static const std::string MY_BASE_RADIUS_ID("base_radius");
48 return MY_BASE_RADIUS_ID;
51 /// Attribute name of the radius
52 inline static const std::string& TOP_RADIUS_ID()
54 static const std::string MY_TOP_RADIUS_ID("top_radius");
55 return MY_TOP_RADIUS_ID;
58 /// Attribute name of the radius
59 inline static const std::string& HEIGHT_ID()
61 static const std::string MY_HEIGHT_ID("height");
65 /// Returns the kind of a feature
66 PRIMITIVESPLUGIN_EXPORT virtual const std::string& getKind()
68 static std::string MY_KIND = PrimitivesPlugin_Cone::ID();
72 /// Creates a new part document if needed
73 PRIMITIVESPLUGIN_EXPORT virtual void execute();
75 /// Request for initialization of data model of the feature: adding all attributes
76 PRIMITIVESPLUGIN_EXPORT virtual void initAttributes();
78 /// Use plugin manager for features creation
79 PrimitivesPlugin_Cone();
82 /// Load Naming data structure of the feature to the document
83 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Cone> theConeAlgo,
84 std::shared_ptr<ModelAPI_ResultBody> theResultCone);
88 #endif // PRIMITIVESPLUGIN_CONE_H_