[solved] how to get points on the edge of the ellipse

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
dprojects
Posts: 721
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

[solved] how to get points on the edge of the ellipse

Post by dprojects »

I am during creating measure tool and I think it would be nice to make such on hover auto measurements also for pocket holes. But the pocket holes have ellipse shape from both sides. So I would like to get the coordinates of the vectors that lie on the ellipse, the most distant, that is, in line with the center and radius of the ellipse. Is there something like that already at FreeCAD library? more or less the points marked in the image below:

Image

Image
Last edited by dprojects on Sat Sep 24, 2022 3:51 pm, edited 1 time in total.

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: how to get points on the edge of the ellipse

Post by Roy_043 »

Code: Select all

edge.Curve.value(0)
edge.Curve.value(math.pi / 2)
# etc.
User avatar
dprojects
Posts: 721
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: how to get points on the edge of the ellipse

Post by dprojects »

Roy_043 wrote: Sat Sep 24, 2022 3:15 pm

Code: Select all

edge.Curve.value(0)
edge.Curve.value(math.pi / 2)
# etc.
Thanks Roy, this is what I was looking for.

Image

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
Post Reply