X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Boolean.cpp;h=d3fcd0ba506dd41acd7efc5474a7b9b8c8da09d3;hb=ea593bc59e7e9461f6c4e2afd3f24d621edb1011;hp=b768b90af0aadaf7e6dde8a80af97b2601189f5f;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp index b768b90af..d3fcd0ba5 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp @@ -30,11 +30,14 @@ #include #include +#include #include #include #include #include +#include #include +#include #include #include #include @@ -100,3 +103,39 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr t theResultBody->loadDeletedShapes(theMakeShape, *anIter, GeomAPI_Shape::FACE); } } + +//================================================================================================= +void FeaturesPlugin_Boolean::storeResult( + const ListOfShape& theObjects, + const ListOfShape& theTools, + const GeomShapePtr theResultShape, + int& theResultIndex, + std::shared_ptr theMakeShapeList, + std::vector& theResultBaseAlgoList) +{ + if (!theResultShape) + return; + + std::shared_ptr aResultBody = + document()->createBody(data(), theResultIndex); + + FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, + theObjects, + theTools, + theMakeShapeList, + theResultShape); + setResult(aResultBody, theResultIndex++); + + // merge algorithms + FeaturesPlugin_Tools::ResultBaseAlgo aRBA; + aRBA.resultBody = aResultBody; + aRBA.baseShape = theObjects.front(); + for (std::vector::iterator + aRBAIt = theResultBaseAlgoList.begin(); + aRBAIt != theResultBaseAlgoList.end(); ++aRBAIt) { + theMakeShapeList->appendAlgo(aRBAIt->makeShape); + } + aRBA.makeShape = theMakeShapeList; + theResultBaseAlgoList.clear(); + theResultBaseAlgoList.push_back(aRBA); +}