X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FFeaturesAPI%2FFeaturesAPI_Boolean.cpp;h=f47eab172fd41fbc0562b6ccca1785bb09c892da;hb=07889bdf129940bf25021b91aa58902e634a64ce;hp=4ee728c6c45132dee6e2606b599a74b76652dbd8;hpb=ad65e8a81e0848a96a4124626a59a511655fb036;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_Boolean.cpp b/src/FeaturesAPI/FeaturesAPI_Boolean.cpp index 4ee728c6c..f47eab172 100644 --- a/src/FeaturesAPI/FeaturesAPI_Boolean.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Boolean.cpp @@ -6,6 +6,7 @@ #include "FeaturesAPI_Boolean.h" +#include #include #include #include @@ -29,7 +30,7 @@ FeaturesAPI_Boolean::FeaturesAPI_Boolean(const std::shared_ptr fillAttribute(theMainObjects, mymainObjects); fillAttribute(theToolObjects, mytoolObjects); - execute(); + execute(false); } } @@ -63,6 +64,31 @@ void FeaturesAPI_Boolean::setToolObjects(const std::list execute(); } +//================================================================================================== +void FeaturesAPI_Boolean::dump(ModelHighAPI_Dumper& theDumper) const +{ + FeaturePtr aBase = feature(); + + FeaturesPlugin_Boolean::OperationType aType = + (FeaturesPlugin_Boolean::OperationType)aBase->integer(FeaturesPlugin_Boolean::TYPE_ID())->value(); + + theDumper << aBase << " = model.add"; + + switch(aType) { + case FeaturesPlugin_Boolean::BOOL_CUT: theDumper << "Cut"; break; + case FeaturesPlugin_Boolean::BOOL_FUSE: theDumper << "Fuse"; break; + case FeaturesPlugin_Boolean::BOOL_COMMON: theDumper << "Common"; break; + case FeaturesPlugin_Boolean::BOOL_FILL: theDumper << "Fill"; break; + case FeaturesPlugin_Boolean::BOOL_SMASH: theDumper << "Smash"; break; + } + + const std::string& aDocName = theDumper.name(aBase->document()); + AttributeSelectionListPtr anObjects = aBase->selectionList(FeaturesPlugin_Boolean::OBJECT_LIST_ID()); + AttributeSelectionListPtr aTools = aBase->selectionList(FeaturesPlugin_Boolean::TOOL_LIST_ID()); + + theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools << ")" << std::endl; +} + //================================================================================================== BooleanPtr addCut(const std::shared_ptr& thePart, const std::list& theMainObjects,