20 #ifndef FeaturesPlugin_Rotation_H_
21 #define FeaturesPlugin_Rotation_H_
23 #include <FeaturesPlugin.h>
25 #include <ModelAPI_Feature.h>
36 inline static const std::string&
ID()
38 static const std::string MY_ROTATION_ID(
"Rotation");
39 return MY_ROTATION_ID;
45 static const std::string MY_CREATION_METHOD_ID(
"CreationMethod");
46 return MY_CREATION_METHOD_ID;
52 static const std::string MY_CREATION_METHOD_ID(
"ByAxisAndAngle");
53 return MY_CREATION_METHOD_ID;
59 static const std::string MY_CREATION_METHOD_ID(
"ByThreePoints");
60 return MY_CREATION_METHOD_ID;
66 static const std::string MY_OBJECTS_LIST_ID(
"main_objects");
67 return MY_OBJECTS_LIST_ID;
73 static const std::string MY_AXIS_OBJECT_ID(
"axis_object");
74 return MY_AXIS_OBJECT_ID;
80 static const std::string MY_ANGLE_ID(
"angle");
87 static const std::string MY_CENTER_POINT_ID(
"center_point");
88 return MY_CENTER_POINT_ID;
94 static const std::string MY_START_POINT_ID(
"start_point");
95 return MY_START_POINT_ID;
101 static const std::string MY_END_POINT_ID(
"end_point");
102 return MY_END_POINT_ID;
106 FEATURESPLUGIN_EXPORT
virtual const std::string&
getKind()
113 FEATURESPLUGIN_EXPORT
virtual void execute();
123 std::shared_ptr<GeomAPI_Trsf> rotationByAxisAndAngle();
126 std::shared_ptr<GeomAPI_Trsf> rotationByThreePoints();
129 void performRotation(
const std::shared_ptr<GeomAPI_Trsf>& theTrsf);
Feature for rotation objects around the axis.
Definition: FeaturesPlugin_Rotation.h:33
virtual FEATURESPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: FeaturesPlugin_Rotation.cpp:51
static const std::string & START_POINT_ID()
Attribute name of a center point.
Definition: FeaturesPlugin_Rotation.h:92
virtual FEATURESPLUGIN_EXPORT void execute()
Performs the algorithm and stores results it in the data structure.
Definition: FeaturesPlugin_Rotation.cpp:78
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: FeaturesPlugin_Rotation.h:43
FeaturesPlugin_Rotation()
Use plugin manager for features creation.
Definition: FeaturesPlugin_Rotation.cpp:46
static const std::string & AXIS_OBJECT_ID()
Attribute name of an axis.
Definition: FeaturesPlugin_Rotation.h:71
static const std::string & ANGLE_ID()
Attribute name of angle.
Definition: FeaturesPlugin_Rotation.h:78
static const std::string & OBJECTS_LIST_ID()
Attribute name of referenced objects.
Definition: FeaturesPlugin_Rotation.h:64
static const std::string & END_POINT_ID()
Attribute name of a center point.
Definition: FeaturesPlugin_Rotation.h:99
static const std::string & CREATION_METHOD_BY_ANGLE()
Attribute name for creation method "ByAxisAndAngle".
Definition: FeaturesPlugin_Rotation.h:50
static const std::string & ID()
Rotation kind.
Definition: FeaturesPlugin_Rotation.h:36
static const std::string & CREATION_METHOD_BY_THREE_POINTS()
Attribute name for creation method "ByThreePoints".
Definition: FeaturesPlugin_Rotation.h:57
virtual FEATURESPLUGIN_EXPORT const std::string & getKind()
Definition: FeaturesPlugin_Rotation.h:106
static const std::string & CENTER_POINT_ID()
Attribute name of a center point.
Definition: FeaturesPlugin_Rotation.h:85
Keep the transformation matrix coefficients.
Definition: GeomAPI_Trsf.h:36
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:39