What I need is to obtain a TopoDS_wire so that the mentioned points are part of the spline and, in addition, it is a closed spline.
I have tried with methods such as BezierSpline and the interpolate function but both generate closed curves in which the points P1, P2, P3 and P4 are not part of.
Thanks
Discussion
5 archived replies
Posts are displayed in their archived order.
01Commenter-1
Hello, in OCCT create TopoDS_Vertex for each knot of spline is not possible.
TopoDS_Vertex is a start and end of edge.
I think, BRepBuilderAPI_MakePolygon can help you. You be able to create from 3,4 points via constructor and then usd Add to insert new point.
Best regards, Commenter-1.
02Author
Yes, as you say with the polygon option I could do it. But the goal was to do it with a spline between the points.
Similar to what you can do with SolidWorks or other programs where you can define the position of the points and make a spline pass through them.
Thank you so much
03Commenter-1
What about my next message about GeomAPI_PointsToBSpline? It can help you? I need more information about final result.
GeomAPI_PointsToBSpline help with the next scenarion:
Curve by GeomAPI_PointsToBSpline -> TopoDS_Edge by BRepBuilderAPI_MakeEdge -> TopoDS_Wire by BRepBuilderAPI_MakeWire. In this case you will have 1-2 TopoDS_Vertex.
Best regards, Commenter-1.
04Commenter-1
If you would like to create just a Edge and then Wire from this Edge(you will have only 2 or 1 TopoDS_Vertex in this case). So, for creating BSpline you can use GeomAPI_PointsToBSpline.
Best regards, Commenter-1
05Commenter-2
I propose to use the class GeomAPI_Interpolate. The draw command to create the curve with your points: