Help wanted for scripting an "epicycloid" for sketcher

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Help wanted for scripting an "epicycloid" for sketcher

Post by manuelkrause »

DjangoFreeCAD wrote: Tue Jan 15, 2019 12:18 pm ...
Anyway, I did a few changes in the script

1) use a 5 circles BSpline and not a 3 or 4 circles Bspline
2) control the variation of a simulation of the second derivative of the curve. The goal was to make a more precise control where the curvature is changing more rapidly

You can see on the picture 2 curves, one with 36 points which gives 72 segments due to the smarter accuracy in somme points, and the other on the right with 144 points >>>250 points finally

FreeCAD.gif

Manu,

I think the accuracy is quite correct
Hi Django,
I hope I'm not getting blind ATM, but somehow I miss links to the newly improved versions.
Would you be so kind to add them?

Thank you very much @microelly2 for your inspiration!
Judging from Django's provided picture, the new first method (5 circles) prevents asymmmetric curvature over the whole contour and the second change increases precision in those places where the curve gets "exciting".

So I'd really like to use your newer release! :-D

Best regards
DjangoFreeCAD
Posts: 24
Joined: Mon Dec 31, 2018 6:43 pm
Location: France

Re: Help wanted for scripting an "epicycloid" for sketcher

Post by DjangoFreeCAD »

Manuel,

Excuse me I forgot to put my new version

I rewrote it, and dispatch in different modules you have to put in your macro folder
Attachments
Epitrochoid.FCMacro
script to draw an epicrotoid
(1.25 KiB) Downloaded 48 times
F_FreeCAD.py
FreeCad Interface User Functions
(1.35 KiB) Downloaded 46 times
F_BSpline.py
BSpline functions
(5.12 KiB) Downloaded 44 times
F_Base.py
Base user functions
(1.41 KiB) Downloaded 41 times
Post Reply