X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_BooleanSmash.cpp;h=7c5ce1722b1a032ed013653c55f4a2c2961a71bb;hb=660930f24994da13c3a3ac089abfbfa20cb9b109;hp=4a4d0330f66fb62cfd158bb6ed123b43996fa34b;hpb=947f4a46a1cccd1b6fe1ca746629396b6a71f631;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp index 4a4d0330f..7c5ce1722 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp @@ -35,12 +35,14 @@ FeaturesAPI_BooleanSmash::FeaturesAPI_BooleanSmash( FeaturesAPI_BooleanSmash::FeaturesAPI_BooleanSmash( const std::shared_ptr& theFeature, const std::list& theMainObjects, - const std::list& theToolObjects) + const std::list& theToolObjects, + const ModelHighAPI_Double& theFuzzy) : ModelHighAPI_Interface(theFeature) { if(initialize()) { fillAttribute(theMainObjects, mymainObjects); fillAttribute(theToolObjects, mytoolObjects); + fillAttribute(theFuzzy, myfuzzyParam); execute(false); } @@ -70,6 +72,14 @@ void FeaturesAPI_BooleanSmash::setToolObjects( execute(); } +//================================================================================================== +void FeaturesAPI_BooleanSmash::setFuzzyValue(const ModelHighAPI_Double& theFuzzy) +{ + fillAttribute(theFuzzy, myfuzzyParam); + + execute(); +} + //================================================================================================== void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const { @@ -82,9 +92,12 @@ void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const aBase->selectionList(FeaturesPlugin_BooleanSmash::OBJECT_LIST_ID()); AttributeSelectionListPtr aTools = aBase->selectionList(FeaturesPlugin_BooleanSmash::TOOL_LIST_ID()); + double aFuzzy = aBase->real(FeaturesPlugin_BooleanSmash::FUZZY_PARAM_ID())->value(); theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools; + theDumper << ", fuzzyParam = " << aFuzzy; + if (!aBase->data()->version().empty()) theDumper << ", keepSubResults = True"; @@ -95,10 +108,11 @@ void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const BooleanSmashPtr addSmash(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, + const ModelHighAPI_Double& fuzzyParam, const bool keepSubResults) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID()); if (!keepSubResults) aFeature->data()->setVersion(""); - return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects, theToolObjects)); + return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects, theToolObjects, fuzzyParam)); }