+void FeaturesAPI_Rotation::setPoints(const ModelHighAPI_Selection& theCenterPoint,
+ const ModelHighAPI_Selection& theStartPoint,
+ const ModelHighAPI_Selection& theEndPoint)
+{
+ fillAttribute(FeaturesPlugin_Rotation::CREATION_METHOD_BY_THREE_POINTS(), mycreationMethod);
+ fillAttribute(theCenterPoint, centerPoint());
+ fillAttribute(theStartPoint, startPoint());
+ fillAttribute(theEndPoint, endPoint());
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_Rotation::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeSelectionListPtr anAttrObjects =
+ aBase->selectionList(FeaturesPlugin_Rotation::OBJECTS_LIST_ID());
+
+ theDumper << aBase << " = model.addRotation(" << aDocName << ", " << anAttrObjects;
+
+ std::string aCreationMethod =
+ aBase->string(FeaturesPlugin_Rotation::CREATION_METHOD())->value();
+
+ if (aCreationMethod == FeaturesPlugin_Rotation::CREATION_METHOD_BY_ANGLE()) {
+ AttributeSelectionPtr anAttrAxis = aBase->selection(FeaturesPlugin_Rotation::AXIS_OBJECT_ID());
+ AttributeDoublePtr anAttrAngle = aBase->real(FeaturesPlugin_Rotation::ANGLE_ID());
+ theDumper << ", " << anAttrAxis << ", " << anAttrAngle;
+ } else if (aCreationMethod == FeaturesPlugin_Rotation::CREATION_METHOD_BY_THREE_POINTS()) {
+ AttributeSelectionPtr anAttrCenterPoint =
+ aBase->selection(FeaturesPlugin_Rotation::CENTER_POINT_ID());
+ AttributeSelectionPtr anAttrStartPoint =
+ aBase->selection(FeaturesPlugin_Rotation::START_POINT_ID());
+ AttributeSelectionPtr anAttrEndPoint =
+ aBase->selection(FeaturesPlugin_Rotation::END_POINT_ID());
+ theDumper << ", " << anAttrCenterPoint << ", " << anAttrStartPoint << ", " << anAttrEndPoint;
+ }
+
+ theDumper << ")" << std::endl;
+}
+
+//==================================================================================================
+RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,