24 #ifndef PRIMITIVESPLUGIN_SPHERE_H_
25 #define PRIMITIVESPLUGIN_SPHERE_H_
27 #include <PrimitivesPlugin.h>
28 #include <ModelAPI_Feature.h>
29 #include <GeomAlgoAPI_Sphere.h>
42 inline static const std::string&
ID()
44 static const std::string MY_SPHERE_ID(
"Sphere");
51 static const std::string MY_CREATION_METHOD_ID(
"CreationMethod");
52 return MY_CREATION_METHOD_ID;
58 static const std::string MY_CREATION_METHOD_ID(
"SphereByPointRadius");
59 return MY_CREATION_METHOD_ID;
65 static const std::string MY_CREATION_METHOD_ID(
"SphereByDimensions");
66 return MY_CREATION_METHOD_ID;
72 static const std::string MY_CENTER_POINT_ID(
"center_point");
73 return MY_CENTER_POINT_ID;
79 static const std::string MY_RADIUS_ID(
"radius");
84 inline static const std::string&
RMIN_ID()
86 static const std::string MY_RMIN_ID(
"rmin");
91 inline static const std::string&
RMAX_ID()
93 static const std::string MY_RMAX_ID(
"rmax");
100 static const std::string MY_PHIMIN_ID(
"phimin");
107 static const std::string MY_PHIMAX_ID(
"phimax");
114 static const std::string MY_THETAMIN_ID(
"thetamin");
115 return MY_THETAMIN_ID;
121 static const std::string MY_THETAMAX_ID(
"thetamax");
122 return MY_THETAMAX_ID;
126 PRIMITIVESPLUGIN_EXPORT
virtual const std::string&
getKind()
133 PRIMITIVESPLUGIN_EXPORT
virtual void execute();
143 void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Sphere> theSphereAlgo,
144 std::shared_ptr<ModelAPI_ResultBody> theResultSphere);
147 void createSphereByPtRadius();
151 void createShereByDimensions();
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:39
Feature for creation of a sphere primitive using various methods.
Definition: PrimitivesPlugin_Sphere.h:39
virtual PRIMITIVESPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: PrimitivesPlugin_Sphere.cpp:45
virtual PRIMITIVESPLUGIN_EXPORT void execute()
Creates a new part document if needed.
Definition: PrimitivesPlugin_Sphere.cpp:109
static const std::string & THETAMAX_ID()
attribute name of the higher theta limit
Definition: PrimitivesPlugin_Sphere.h:119
static const std::string & CREATION_METHOD_BY_DIMENSIONS()
Attribute name for creation method.
Definition: PrimitivesPlugin_Sphere.h:63
static const std::string & RADIUS_ID()
Attribute name of the radius.
Definition: PrimitivesPlugin_Sphere.h:77
static const std::string & ID()
Sphere kind.
Definition: PrimitivesPlugin_Sphere.h:42
static const std::string & RMIN_ID()
attribute name of the inner radius
Definition: PrimitivesPlugin_Sphere.h:84
static const std::string & THETAMIN_ID()
attribute name of the lower theta limit
Definition: PrimitivesPlugin_Sphere.h:112
static const std::string & PHIMIN_ID()
attribute name of the lower phi limit
Definition: PrimitivesPlugin_Sphere.h:98
static const std::string & RMAX_ID()
attribute name of the outer radius
Definition: PrimitivesPlugin_Sphere.h:91
virtual PRIMITIVESPLUGIN_EXPORT const std::string & getKind()
Returns the kind of a feature.
Definition: PrimitivesPlugin_Sphere.h:126
static const std::string & CENTER_POINT_ID()
Attribute name of the base point.
Definition: PrimitivesPlugin_Sphere.h:70
PrimitivesPlugin_Sphere()
Use plugin manager for features creation.
Definition: PrimitivesPlugin_Sphere.cpp:40
static const std::string & PHIMAX_ID()
attribute name of the higher phi limit
Definition: PrimitivesPlugin_Sphere.h:105
static const std::string & CREATION_METHOD_BY_PT_RADIUS()
Attribute name for creation method.
Definition: PrimitivesPlugin_Sphere.h:56
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: PrimitivesPlugin_Sphere.h:49