How to make a solid using sections using OPENCASCADE

434 views Asked by At

I create several sections using point data, and finally create a CAD module using OPENCASCADE to create a solid. Until now, the work of creating a section using points has been completed. I would like to know how to create a solid using these sections. Anyone can help?

std::vector<iFan::vector3D>::const_iterator posS;
for (posS = pointData.begin(); posS != pointData.end(); ++posS)
{
    //curve
    Handle(Geom_BSplineCurve) bspline = COCC_Geometry::GenBSplineCurve((*posS), 0.00001, true);
    TopoDS_Edge out_shape = BRepBuilderAPI_MakeEdge(bspline);

    TopoDS_Wire Wc = BRepBuilderAPI_MakeWire(out_shape);
    
    TopoDS_Face F = BRepBuilderAPI_MakeFace(gp_Pln(gp::ZOX()), Wc);
}

enter image description here

1

There are 1 answers

0
Benjamin Bihler On

You probably can use BRepOffsetAPI_MakePipe for that: https://dev.opencascade.org/doc/refman/html/class_b_rep_offset_a_p_i___make_pipe.html

I have only used it to combine wires as profiles to create shells, but the documentation seems to imply that you can also sweep faces to create solids out of it. The only restriction is that the profiles may not be solids themselves.

You will have to use BRepOffsetAPI_MakePipe between two sections each and then combine all the solids to one resulting solid.