X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_CompositeBoolean.cpp;h=cfe002fb0b1ff080ad3d279ac92825f87d85b8e5;hb=56471fb705062cb7289933c005b4ec43afcca349;hp=d10c82d852ff728393fc144d6cfcf34e01ffda99;hpb=58b7bac556b297dd2891ad4aacbdee5d03be26f1;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp index d10c82d85..cfe002fb0 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp @@ -225,17 +225,20 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools, aMakeShapeList->appendAlgo(aBoolAlgo); // Add result to not used solids from compsolid. - aShapesToAdd.push_back(aBoolAlgo->shape()); - std::shared_ptr aFillerAlgo( - new GeomAlgoAPI_PaveFiller(aShapesToAdd, true)); - if(!aFillerAlgo->isDone() || aFillerAlgo->shape()->isNull() || !aFillerAlgo->isValid()) { - myFeature->setError("Error: PaveFiller algorithm failed."); - return false; + GeomShapePtr aBoolRes = aBoolAlgo->shape(); + if (!aShapesToAdd.empty()) { + aShapesToAdd.push_back(aBoolRes); + std::shared_ptr aFillerAlgo( + new GeomAlgoAPI_PaveFiller(aShapesToAdd, true)); + if(!aFillerAlgo->isDone() || aFillerAlgo->shape()->isNull() || !aFillerAlgo->isValid()) { + myFeature->setError("Error: PaveFiller algorithm failed."); + return false; + } + aBoolRes = aFillerAlgo->shape(); + aMakeShapeList->appendAlgo(aFillerAlgo); } - aMakeShapeList->appendAlgo(aFillerAlgo); - - if(GeomAlgoAPI_ShapeTools::volume(aFillerAlgo->shape()) > 1.e-27) { + if(GeomAlgoAPI_ShapeTools::volume(aBoolRes) > 1.e-27) { theObjects.push_back(aCompSolid); theMakeShapes.push_back(aMakeShapeList); }