+//==================================================================================================
+void FeaturesAPI_RemoveSubShapes::setSubShapesToRemove(
+ const std::list<ModelHighAPI_Selection>& theSubShapes)
+{
+ fillAttribute(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_REMOVE_SUBSHAPES(),
+ mycreationMethod);
+ fillAttribute(theSubShapes, mysubshapesToRemove);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_RemoveSubShapes::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeSelectionPtr anAttrBaseShape =
+ aBase->selection(FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID());
+
+ std::string aCreationMethod =
+ aBase->string(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD())->value();
+
+ AttributeSelectionListPtr anAttrSubShapes;
+
+ bool isKeepSubs =
+ aCreationMethod == FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES();
+ if (isKeepSubs) {
+ anAttrSubShapes =
+ aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_KEEP_ID());
+ }
+ else {
+ anAttrSubShapes =
+ aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_REMOVE_ID());
+ }
+
+ theDumper << aBase << " = model.addRemoveSubShapes("
+ << aDocName << ", " << anAttrBaseShape << ")"
+ << "\n"
+ << theDumper.name(aBase)
+ << (isKeepSubs ? ".setSubShapesToKeep(" : ".setSubShapesToRemove(")
+ << anAttrSubShapes << ")" << std::endl;
+}
+