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.