- // Getting tools.
- TopTools_ListOfShape aTools;
- for (ListOfShape::const_iterator
- aToolsIt = theTools.begin(); aToolsIt != theTools.end(); aToolsIt++) {
- const TopoDS_Shape& aShape = (*aToolsIt)->impl<TopoDS_Shape>();
- if(!aShape.IsNull()) {
- aTools.Append(aShape);
- }
+ BOPAlgo_PaveFiller* aDSFiller = new BOPAlgo_PaveFiller;
+ myFiller = aDSFiller;
+ aDSFiller->SetArguments(anObjects);
+
+ aDSFiller->SetRunParallel(false);
+ aDSFiller->SetNonDestructive(false);
+ aDSFiller->SetGlue(BOPAlgo_GlueOff);
+
+ // optimization for the issue #2399
+ BOPAlgo_SectionAttribute theSecAttr(Standard_True,
+ Standard_True,
+ Standard_True);
+ aDSFiller->SetSectionAttribute(theSecAttr);
+
+ aDSFiller->Perform();
+ if (aDSFiller->HasErrors()) {
+ return;