1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D
3 // File: PrimitivesPlugin_Torus.h
4 // Created: 17 Mar 2017
5 // Author: Clarisse Genrault (CEA)
7 #ifndef PRIMITIVESPLUGIN_TORUS_H_
8 #define PRIMITIVESPLUGIN_TORUS_H_
10 #include <PrimitivesPlugin.h>
11 #include <ModelAPI_Feature.h>
12 #include <GeomAlgoAPI_Torus.h>
14 /**\class PrimitivesPlugin_Torus
16 * \brief Feature for creation of a torus.
18 * Creates a torus from a
20 class PrimitivesPlugin_Torus : public ModelAPI_Feature
24 inline static const std::string& ID()
26 static const std::string MY_TORUS_ID("Torus");
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 radius
45 inline static const std::string& RADIUS_ID()
47 static const std::string MY_RADIUS_ID("radius");
51 /// Attribute name of the section radius
52 inline static const std::string& RING_RADIUS_ID()
54 static const std::string MY_RING_RADIUS_ID("ring_radius");
55 return MY_RING_RADIUS_ID;
58 /// Returns the kind of a feature
59 PRIMITIVESPLUGIN_EXPORT virtual const std::string& getKind()
61 static std::string MY_KIND = PrimitivesPlugin_Torus::ID();
65 /// Creates a new part document if needed
66 PRIMITIVESPLUGIN_EXPORT virtual void execute();
68 /// Request for initialization of data model of the feature: adding all attributes
69 PRIMITIVESPLUGIN_EXPORT virtual void initAttributes();
71 /// Use plugin manager for features creation
72 PrimitivesPlugin_Torus();
75 /// Load Naming data structure of the feature to the document
76 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Torus> theTorusAlgo,
77 std::shared_ptr<ModelAPI_ResultBody> theResultTorus);
81 #endif // PRIMITIVESPLUGIN_TORUS_H_