Some TopoDS_Face to a TopoDS_Solid

I like to merge some faces to a solid. Can I do that in a simple way?
My goal is to triangulate the resuling solid (shape).

Rob Bachrach's picture

Assuming that the faces are topologically disjoint (meaning that they may have coincident edges and vertices, but that those edges and vertices are not the same CASCADE objects), you would use BRepOffsetAPI_Sewing and its Add function to join the faces. The resulting SewedShape should be a TopoDS_Shell. If it is, you can then use BRepBuilderAPI_MakeSolid to turn the shell into a solid. Granted, if all you need is the triangulation, you can keep the shell and ignore the solid.

If the faces are topologically joined (sharing vertices and edges), you can use BRepBuilder to create a shell directly from the faces.

d00_ape's picture

Perfect! That BRepOffsetAPI_Sewing made it for me!!

sas's picture

How to use Breptools Dump function!
Give me small example; like i have
TopoDS_Edge aEdge1OnSurf1 = BRepBuilderAPI_MakeEdge(aArc1 , aCyl1);
How can i print this aEdge1OnSurf1 on screen using OCAF. I can visualize the model, but i can't get data inside the model.
how to use write and read in BrepTools lib

sasa