#include <algorithm>
#include <map>
+
+//=================================================================================================
static void performBoolean(const GeomAlgoAPI_Tools::BOPType theBooleanType,
GeomMakeShapePtr& theBooleanAlgo,
const ListOfShape& theObjects,
- const ListOfShape& theTools)
+ const ListOfShape& theTools,
+ const double theFuzzy)
{
if (theBooleanType == GeomAlgoAPI_Tools::BOOL_PARTITION)
theBooleanAlgo.reset(new GeomAlgoAPI_Partition(theObjects, theTools));
ListOfShape anObjects = theObjects;
ListOfShape aTools;
aTools.splice(aTools.begin(), anObjects, anObjects.begin());
- theBooleanAlgo.reset(new GeomAlgoAPI_Boolean(anObjects, aTools, theBooleanType));
+ theBooleanAlgo.reset(new GeomAlgoAPI_Boolean(anObjects, aTools, theBooleanType, theFuzzy));
}
}
else
- theBooleanAlgo.reset(new GeomAlgoAPI_Boolean(theObjects, theTools, theBooleanType));
+ theBooleanAlgo.reset(new GeomAlgoAPI_Boolean(theObjects, theTools, theBooleanType, theFuzzy));
}
}
const GeomShapePtr& theObject,
const ListOfShape& theTools,
const ListOfShape& thePlanes,
+ const double theFuzzy,
int& theResultIndex,
std::vector<ModelAPI_Tools::ResultBaseAlgo>& theResultBaseAlgoList,
ListOfShape& theResultShapesList,
aToolsWithPlanes.insert(aToolsWithPlanes.end(), aPlanesCopy.begin(), aPlanesCopy.end());
if (theBooleanType == GeomAlgoAPI_Tools::BOOL_PARTITION)
- aBoolAlgo.reset(new GeomAlgoAPI_Partition(aListWithObject, aToolsWithPlanes));
+ aBoolAlgo.reset(new GeomAlgoAPI_Partition(aListWithObject, aToolsWithPlanes, theFuzzy));
else
aBoolAlgo.reset(new GeomAlgoAPI_Boolean(aListWithObject,
aToolsWithPlanes,
- theBooleanType));
+ theBooleanType,
+ theFuzzy));
// Checking that the algorithm worked properly.
std::string anError;
const GeomShapePtr& theCompsolid,
const ListOfShape& theTools,
const ListOfShape& thePlanes,
+ const double theFuzzy,
int& theResultIndex,
std::vector<ModelAPI_Tools::ResultBaseAlgo>& theResultBaseAlgoList,
ListOfShape& theResultShapesList,
aToolsWithPlanes.insert(aToolsWithPlanes.end(), aPlanesCopy.begin(), aPlanesCopy.end());
std::shared_ptr<GeomAlgoAPI_MakeShape> aBoolAlgo;
- performBoolean(theBooleanType, aBoolAlgo, aUsedInOperationSolids, aToolsWithPlanes);
+ performBoolean(theBooleanType, aBoolAlgo, aUsedInOperationSolids, aToolsWithPlanes, theFuzzy);
// Checking that the algorithm worked properly.
std::string anError;
ListOfShape aShapesToAdd = aNotUsedSolids;
aShapesToAdd.push_back(aBoolAlgo->shape());
std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(
- new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
+ new GeomAlgoAPI_PaveFiller(aShapesToAdd, true, theFuzzy));
if (!aFillerAlgo->isDone()) {
std::string aFeatureError = "Error: PaveFiller algorithm failed.";
setError(aFeatureError);
GeomAPI_ShapeHierarchy& theCompoundHierarchy,
const GeomShapePtr& theCompound,
const ListOfShape& theTools,
+ const double theFuzzy,
int& theResultIndex,
std::vector<ModelAPI_Tools::ResultBaseAlgo>& theResultBaseAlgoList,
ListOfShape& theResultShapesList,
std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeShapeList(new GeomAlgoAPI_MakeShapeList());
std::shared_ptr<GeomAlgoAPI_MakeShape> aBoolAlgo;
- performBoolean(theBooleanType, aBoolAlgo, aUsedInOperationShapes, theTools);
+ performBoolean(theBooleanType, aBoolAlgo, aUsedInOperationShapes, theTools, theFuzzy);
// Checking that the algorithm worked properly.
std::string anError;