+//==================================================================================================
+void FeaturesAPI_Translation::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeSelectionListPtr anAttrObjects =
+ aBase->selectionList(FeaturesPlugin_Translation::OBJECTS_LIST_ID());
+ theDumper << aBase << " = model.addTranslation(" << aDocName << ", " << anAttrObjects;
+
+ std::string aCreationMethod =
+ aBase->string(FeaturesPlugin_Translation::CREATION_METHOD())->value();
+
+ if (aCreationMethod == FeaturesPlugin_Translation::CREATION_METHOD_BY_DISTANCE()) {
+ AttributeSelectionPtr anAttrAxis =
+ aBase->selection(FeaturesPlugin_Translation::AXIS_OBJECT_ID());
+ AttributeDoublePtr anAttrDistance =
+ aBase->real(FeaturesPlugin_Translation::DISTANCE_ID());
+ theDumper << ", " << anAttrAxis << ", " << anAttrDistance;
+ } else if (aCreationMethod == FeaturesPlugin_Translation::CREATION_METHOD_BY_DIMENSIONS()) {
+ AttributeDoublePtr anAttrDx = aBase->real(FeaturesPlugin_Translation::DX_ID());
+ AttributeDoublePtr anAttrDy = aBase->real(FeaturesPlugin_Translation::DY_ID());
+ AttributeDoublePtr anAttrDz = aBase->real(FeaturesPlugin_Translation::DZ_ID());
+ theDumper << ", " << anAttrDx << ", " << anAttrDy << ", " << anAttrDz;
+ } else if (aCreationMethod == FeaturesPlugin_Translation::CREATION_METHOD_BY_TWO_POINTS()) {
+ AttributeSelectionPtr anAttrStartPoint =
+ aBase->selection(FeaturesPlugin_Translation::START_POINT_ID());
+ AttributeSelectionPtr anAttrEndPoint =
+ aBase->selection(FeaturesPlugin_Translation::END_POINT_ID());
+ theDumper << ", " << anAttrStartPoint << ", " << anAttrEndPoint;
+ }
+
+ theDumper << ")" << std::endl;
+}
+