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?
how to export a series of points on a curve
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 16
- Joined: Mon Jul 29, 2019 11:07 pm
how to export a series of points on a curve
Last edited by silent_missile on Tue Sep 24, 2019 5:14 am, edited 2 times in total.
Re: how to export a serious points on a curve
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
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
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: how to export a series of points on a curve
you can use discretize
edge=FreeCAD.ActiveDocument.BePlane.Shape.Edge1
pts=edge.discretize(100)
Part.show(Part.makePolygon(pts))
edge=FreeCAD.ActiveDocument.BePlane.Shape.Edge1
pts=edge.discretize(100)
Part.show(Part.makePolygon(pts))