Extracting points along a parametric curve

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ChrisFC
Posts: 27
Joined: Mon Jul 26, 2021 8:30 am

Extracting points along a parametric curve

Post by ChrisFC »

Hello there,

I have a (presumed) edge that is described as a parametric curve, with 2 points, one at either end of the edge. I have no issue getting these end points, however, I would like to be able to get a series of points along this curve. From my understanding of FreeCAD, there are presently only the 2 aforementioned endpoints in the vertexes list; I would like to be able to get more, in order to plot a nice smooth representation of this curve, as opposed to the straight line between the endpoints that I currently have :lol:

Cheers,
Chris
User avatar
Chris_G
Veteran
Posts: 2598
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Extracting points along a parametric curve

Post by Chris_G »

Code: Select all

points = my_edge.discretize(100)
Complete API :

Code: Select all

help(Part.Edge.discretize)
Post Reply