
Fri, 01/20/2023 - 13:01
Hi, I need to fuse 10 TopoDS_Solid which represent simple 3D boxes. I found this peace of code on the official OCC web site (https://dev.opencascade.org/doc/overview/html/specification__boolean_ope...):
#include <TopoDS_Shape.hxx>
#include <TopTools_ListOfShape.hxx>
#include < BRepAlgoAPI_Fuse.hxx>
{…
Standard_Boolean bRunParallel;
Standard_Real aFuzzyValue;
BRepAlgoAPI_Fuse aBuilder;
// perpare the arguments
TopTools_ListOfShape& aLS=…;
TopTools_ListOfShape& aLT=…;
//
bRunParallel=Standard_True;
aFuzzyValue=2.1e-5;
//
// set the arguments
aBuilder.SetArguments(aLS);
aBuilder.SetTools(aLT);
//
// Set options for the algorithm
// setting options for this algorithm is similar to setting options for GF algorithm (see "GF Usage" chapter)
...
//
// run the algorithm
aBuilder.Build();
if (aBuilder.HasErrors()) {
// an error treatment
return;
}
//
// result of the operation aR
const TopoDS_Shape& aR=aBuilder.Shape();
…
}
In that case, what do represent the two variables aLS and ALT ? What are the functions SetArguments() and the SetTools() in this context ? Just to know where to put the 10 boxes...
Another question: can we choose if the final result will be a regular TopoDS_Solid with no internal faces or if it can contain all the split faces coming from the original boxes ?
Thanks.