Fri, 02/01/2019 - 21:56
Forums:
Hello,
I created a spline surface tube from a set of points, but now I am trying to create faces for the end caps. My goal is to created a closed manifold, then create a solid, and finally conduct boolean operations for two solids.
I create the splice surface using PointsToBSplineSurface like:
GeomAPI_PointsToBSplineSurface spline_builder(points, 4, 6, GeomAbs_C2, 0.05);
auto& spline_surf = spline_builder.Surface();
spline_surf ->SetVPeriodic();
I checked the edges and there are 4, but I cannot figure out how to create the end caps. I assume it would involve the edges? Any help would be greatly appreciated.
Sat, 02/02/2019 - 20:00
I figured it out. I got the used TopoDS_Exp to get the edges. For each of the closed edges, I used:
BRepFill_Filling fill;
fill.Add(edge, GeomAbs_C0);
fill.Build();
auto end_cap_face = fill.Face();
This gives me to end caps, then I just sewed them together with BRepOffsetAPI_Sewing to create the shell. From the shell, the solid could easily be created with BRepBuilderAPI_MakeSolid. I hope that helps someone out there.