Forum archiveIssue archiveModeling Data and Algorithms

Archived discussion

Building a TopoDS_Shape from multiple TopoDS_Solid objects

Modeling Data and AlgorithmsFri, 10/04/2024 - 19:421 reply

Browse this forum
QuestionAuthor

So fundamental that it's a bit embarrassing. How might I build a single TopoDS_Shape object from multiple TopoDS_Solid objects?

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

Hello,

There are 2 options:

TopoDS_Compound aComp;
BRep_Builder{}.MakeCompound(aComp);
BRep_Builder{}.Add(aComp, aSolid1);
...
BRep_Builder{}.Add(aComp, aSolidN);

And second option is Boolean Fuse operation.

BRepAlgoAPI_Fuse fuse(face1, face2);
fuse.SimplifyResult();
return fuse.Shape();

Best regards. Commenter-1.