24 #ifndef FEATURESPLUGIN_MULTIROTATION_H_
25 #define FEATURESPLUGIN_MULTIROTATION_H_
27 #include <FeaturesPlugin.h>
29 #include <GeomAlgoAPI_Rotation.h>
30 #include <GeomAlgoAPI_Translation.h>
32 #include <ModelAPI_Feature.h>
44 inline static const std::string&
ID()
46 static const std::string MY_MULTIROTATION_ID(
"AngularCopy");
47 return MY_MULTIROTATION_ID;
53 static const std::string MY_OBJECTS_LIST_ID(
"main_objects");
54 return MY_OBJECTS_LIST_ID;
60 static const std::string MY_AXIS_ANGULAR_ID(
"axis_angular");
61 return MY_AXIS_ANGULAR_ID;
67 static const std::string MY_USE_ANGULAR_STEP_ID(
"use_step_angular");
68 return MY_USE_ANGULAR_STEP_ID;
74 static const std::string MY_STEP_ANGULAR_ID(
"step_angular");
75 return MY_STEP_ANGULAR_ID;
81 static const std::string MY_NB_COPIES_ANGULAR_ID(
"nb_angular");
82 return MY_NB_COPIES_ANGULAR_ID;
88 static const std::string MY_USE_RADIAL_DIR_ID(
"use_radial_dir");
89 return MY_USE_RADIAL_DIR_ID;
95 static const std::string MY_STEP_RADIAL_ID(
"step_radial");
96 return MY_STEP_RADIAL_ID;
102 static const std::string MY_NB_COPIES_RADIAL_ID(
"nb_radial");
103 return MY_NB_COPIES_RADIAL_ID;
107 FEATURESPLUGIN_EXPORT
virtual const std::string&
getKind()
114 FEATURESPLUGIN_EXPORT
virtual void execute();
125 bool paramsOfRotation(std::shared_ptr<GeomAPI_Ax1>& theAxis,
double& theAngle,
int& theQuantity);
128 void performRotation1D();
130 #ifdef FEATURE_MULTIROTATION_TWO_DIRECTIONS
132 void performRotation2D();
134 void loadNamingDS2(std::list<std::shared_ptr<GeomAlgoAPI_Translation> > theListOfTranslationAlgo,
135 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
136 std::shared_ptr<GeomAPI_Shape> theBaseShape);
138 void loadNamingDS3(std::list<std::shared_ptr<GeomAlgoAPI_Rotation> > theListOfRotationAlgo,
139 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
140 std::shared_ptr<GeomAPI_Shape> theBaseShape,
int nb);
Feature that rotaes object around an axis an number of times.
Definition: FeaturesPlugin_MultiRotation.h:41
static const std::string & OBJECTS_LIST_ID()
Attribute name of referenced objects.
Definition: FeaturesPlugin_MultiRotation.h:51
static const std::string & NB_COPIES_RADIAL_ID()
Attribute name of number of copies for radial.
Definition: FeaturesPlugin_MultiRotation.h:100
static const std::string & USE_ANGULAR_STEP_ID()
Attribute name for use angular step.
Definition: FeaturesPlugin_MultiRotation.h:65
static const std::string & AXIS_ANGULAR_ID()
Attribute name of the angular direction.
Definition: FeaturesPlugin_MultiRotation.h:58
static const std::string & ID()
Multi-rotation kind.
Definition: FeaturesPlugin_MultiRotation.h:44
virtual FEATURESPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: FeaturesPlugin_MultiRotation.cpp:60
static const std::string & STEP_RADIAL_ID()
Attribute name of radial step.
Definition: FeaturesPlugin_MultiRotation.h:93
virtual FEATURESPLUGIN_EXPORT void execute()
Performs the algorithm and stores results it in the data structure.
Definition: FeaturesPlugin_MultiRotation.cpp:92
static const std::string & USE_RADIAL_DIR_ID()
Attribute name for use radial dir.
Definition: FeaturesPlugin_MultiRotation.h:86
virtual FEATURESPLUGIN_EXPORT const std::string & getKind()
Definition: FeaturesPlugin_MultiRotation.h:107
static const std::string & NB_COPIES_ANGULAR_ID()
Attribute name of number of copies for angular.
Definition: FeaturesPlugin_MultiRotation.h:79
FeaturesPlugin_MultiRotation()
Use plugin manager for features creation.
Definition: FeaturesPlugin_MultiRotation.cpp:55
static const std::string & STEP_ANGULAR_ID()
Attribute name of step for the angular.
Definition: FeaturesPlugin_MultiRotation.h:72
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:39