how to export a series of points on a 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
silent_missile
Posts: 16
Joined: Mon Jul 29, 2019 11:07 pm

how to export a series of points on a curve

Post by silent_missile »

here is a curve, maybe it's generated by NURBS, or it's generated by intersection of 2 surfaces

now I need to export a series of points on the curve to
[[x0, y0, z0], [x1, y1, z1],...]

is there any API can do this? please help me.

also, if I want to modify the resolution of the points, how to do it?
Last edited by silent_missile on Tue Sep 24, 2019 5:14 am, edited 2 times in total.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: how to export a serious points on a curve

Post by kisolre »

I think you meant series (not serious) of points. Please correct your wording so the post will make sence for future searches.

I my script I needed a serie of points along a curve so there is somethig in tit. Check out the thread at https://forum.freecadweb.org/viewtopic.php?f=22&t=38057
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: how to export a series of points on a curve

Post by microelly2 »

you can use discretize

edge=FreeCAD.ActiveDocument.BePlane.Shape.Edge1
pts=edge.discretize(100)
Part.show(Part.makePolygon(pts))
Post Reply