Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Task 3.2. To keep compounds’ sub-shapes for all operations (issue #3139)
[modules/shaper.git]
/
src
/
FeaturesAPI
/
FeaturesAPI_BooleanSmash.cpp
diff --git
a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp
b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp
index 9c22e3bd34a632af326690dc06babf9138d26a9d..0d2abf81f36fff3df4e704437be28a3404cc99dc 100644
(file)
--- a/
src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp
+++ b/
src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp
@@
-83,16
+83,22
@@
void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const
AttributeSelectionListPtr aTools =
aBase->selectionList(FeaturesPlugin_BooleanSmash::TOOL_LIST_ID());
AttributeSelectionListPtr aTools =
aBase->selectionList(FeaturesPlugin_BooleanSmash::TOOL_LIST_ID());
- theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools << ")" << std::endl;
+ theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools;
+
+ if (!aBase->data()->version().empty())
+ theDumper << ", keepSubResults = True";
+
+ theDumper << ")" << std::endl;
}
//==================================================================================================
BooleanSmashPtr addSmash(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
}
//==================================================================================================
BooleanSmashPtr addSmash(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
- const std::list<ModelHighAPI_Selection>& theToolObjects)
+ const std::list<ModelHighAPI_Selection>& theToolObjects,
+ const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID());
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID());
- return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature,
- theMainObjects,
-
theToolObjects));
+ if (!keepSubResults)
+ aFeature->data()->setVersion("");
+
return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects,
theToolObjects));
}
}