20 #ifndef FEATURESPLUGIN_SCALE_H_
21 #define FEATURESPLUGIN_SCALE_H_
23 #include <FeaturesPlugin.h>
25 #include <ModelAPI_Feature.h>
35 inline static const std::string&
ID()
37 static const std::string MY_SCALE_ID(
"Scale");
44 static const std::string MY_CREATION_METHOD_ID(
"CreationMethod");
45 return MY_CREATION_METHOD_ID;
51 static const std::string MY_CREATION_METHOD_ID(
"ByFactor");
52 return MY_CREATION_METHOD_ID;
58 static const std::string MY_CREATION_METHOD_ID(
"ByDimensions");
59 return MY_CREATION_METHOD_ID;
65 static const std::string MY_OBJECTS_LIST_ID(
"main_objects");
66 return MY_OBJECTS_LIST_ID;
72 static const std::string MY_CENTER_POINT_ID(
"center_point");
73 return MY_CENTER_POINT_ID;
79 static const std::string MY_SCALE_FACTOR_ID(
"scale_factor");
80 return MY_SCALE_FACTOR_ID;
86 static const std::string MY_SCALE_FACTOR_X_ID(
"scale_factor_x");
87 return MY_SCALE_FACTOR_X_ID;
93 static const std::string MY_SCALE_FACTOR_Y_ID(
"scale_factor_y");
94 return MY_SCALE_FACTOR_Y_ID;
100 static const std::string MY_SCALE_FACTOR_Z_ID(
"scale_factor_z");
101 return MY_SCALE_FACTOR_Z_ID;
105 FEATURESPLUGIN_EXPORT
virtual const std::string&
getKind()
112 FEATURESPLUGIN_EXPORT
virtual void execute();
122 void performScaleByFactor();
125 void performScaleByDimensions();
Feature for changing the scale of an object.
Definition: FeaturesPlugin_Scale.h:32
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: FeaturesPlugin_Scale.h:42
static const std::string & CREATION_METHOD_BY_DIMENSIONS()
Attribute name for creation method "ByFactor".
Definition: FeaturesPlugin_Scale.h:56
virtual FEATURESPLUGIN_EXPORT const std::string & getKind()
Definition: FeaturesPlugin_Scale.h:105
FeaturesPlugin_Scale()
Use plugin manager for features creation.
Definition: FeaturesPlugin_Scale.cpp:41
static const std::string & CENTER_POINT_ID()
Attribute name of center point.
Definition: FeaturesPlugin_Scale.h:70
static const std::string & SCALE_FACTOR_Z_ID()
Attribute name of scale factor in Z.
Definition: FeaturesPlugin_Scale.h:98
virtual FEATURESPLUGIN_EXPORT void execute()
Performs the algorithm and stores results it in the data structure.
Definition: FeaturesPlugin_Scale.cpp:75
static const std::string & ID()
Scale kind.
Definition: FeaturesPlugin_Scale.h:35
static const std::string & OBJECTS_LIST_ID()
Attribute name of referenced objects.
Definition: FeaturesPlugin_Scale.h:63
static const std::string & CREATION_METHOD_BY_FACTOR()
Attribute name for creation method "ByFactor".
Definition: FeaturesPlugin_Scale.h:49
static const std::string & SCALE_FACTOR_X_ID()
Attribute name of scale factor in X.
Definition: FeaturesPlugin_Scale.h:84
virtual FEATURESPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: FeaturesPlugin_Scale.cpp:46
static const std::string & SCALE_FACTOR_Y_ID()
Attribute name of scale factor in Y.
Definition: FeaturesPlugin_Scale.h:91
static const std::string & SCALE_FACTOR_ID()
Attribute name of scale factor.
Definition: FeaturesPlugin_Scale.h:77
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41