Salome HOME
Issue #1740 The visualization of selected point in the graphic scene is not visible
[modules/shaper.git] / src / BuildAPI / BuildAPI_SubShapes.cpp
index b6e2a729bb657082176b3514fa13f11879a34a45..21f23e83928e4787616ee7f716ee945f26f0392c 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "BuildAPI_SubShapes.h"
 
+#include <ModelHighAPI_Dumper.h>
 #include <ModelHighAPI_Tools.h>
 
 //==================================================================================================
@@ -49,7 +50,17 @@ void BuildAPI_SubShapes::setSubShapes(const std::list<ModelHighAPI_Selection>& t
   execute();
 }
 
-// TODO(spo): make add* as static functions of the class
+//==================================================================================================
+void BuildAPI_SubShapes::dump(ModelHighAPI_Dumper& theDumper) const
+{
+  FeaturePtr aBase = feature();
+  std::string aPartName = theDumper.name(aBase->document());
+
+  theDumper << aBase << " = model.addSubShapes(" << aPartName << ", "
+            << aBase->selection(BuildPlugin_SubShapes::BASE_SHAPE_ID()) << ", "
+            << aBase->selectionList(BuildPlugin_SubShapes::SUBSHAPES_ID()) << ")" << std::endl;
+}
+
 //==================================================================================================
 SubShapesPtr addSubShapes(const std::shared_ptr<ModelAPI_Document>& thePart,
                           const ModelHighAPI_Selection& theBaseShape,