#include "FeaturesPlugin_BooleanFill.h"
#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_Tools.h>
#include <algorithm>
#include <map>
+
//=================================================================================================
FeaturesPlugin_BooleanFill::FeaturesPlugin_BooleanFill()
: FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_FILL)
keepUnusedSubsOfCompound(GeomShapePtr(), anObjects, aTools, aMakeShapeList);
}
+ // Getting fuzzy parameter.
+ // Used as additional tolerance to eliminate tiny results.
+ double aFuzzy = real(FUZZY_PARAM_ID())->value();
+
// For solids cut each object with all tools.
bool isOk = true;
for (GeomAPI_ShapeHierarchy::iterator anObjectsIt = anObjects.begin();
// compsolid handling
isOk = processCompsolid(GeomAlgoAPI_Tools::BOOL_PARTITION,
anObjects, aParent, aTools.objects(), aPlanes,
+ aFuzzy,
aResultIndex, aResultBaseAlgoList, aResultShapesList,
aResultCompound);
} else {
// process object as is
isOk = processObject(GeomAlgoAPI_Tools::BOOL_PARTITION,
anObject, aTools.objects(), aPlanes,
+ aFuzzy,
aResultIndex, aResultBaseAlgoList, aResultShapesList,
aResultCompound);
}
if (!aResultCompound)
aResultCompound = GeomAlgoAPI_CompoundBuilder::compound(aResultShapesList);
ModelAPI_Tools::loadDeletedShapes(aResultBaseAlgoList,
- aTools.objects(),
- aResultCompound);
+ aTools.objects(),
+ aResultCompound);
// remove the rest results if there were produced in the previous pass
removeResults(aResultIndex);