#include "FeaturesAPI_Translation.h"
+#include <ModelHighAPI_Dumper.h>
#include <ModelHighAPI_Tools.h>
//==================================================================================================
execute();
}
+//==================================================================================================
+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());
+ AttributeSelectionPtr anAttrAxis = aBase->selection(FeaturesPlugin_Translation::AXIS_OBJECT_ID());
+ AttributeDoublePtr anAttrDistance = aBase->real(FeaturesPlugin_Translation::DISTANCE_ID());
+
+ theDumper << aBase << " = model.addTranslation(" << aDocName << ", "
+ << anAttrObjects << ", " << anAttrAxis << ", " << anAttrDistance << ")" << std::endl;
+}
+
//==================================================================================================
TranslationPtr addTranslation(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
#include <ModelHighAPI_Macro.h>
class ModelHighAPI_Double;
+class ModelHighAPI_Dumper;
class ModelHighAPI_Selection;
/// \class FeaturesAPI_Translation
/// Set distance.
FEATURESAPI_EXPORT
void setDistance(const ModelHighAPI_Double& theDistance);
+
+ /// Dump wrapped feature
+ FEATURESAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
};
/// Pointer on Translation object.