I had some free time, so I taught myself how to write feature scripts in Onshape. This particular project generates Epitrochoids, intended to be used when designing cycloidal gearboxes.
The code for the featurescript is based on work published by Omar Younis: Building a Cycloidal Drive with SOLIDWORKS
.
There’s not really much to explain in terms of how it works. It just uses the formulas in the aforementioned work to generate a bunch of points along an epitrochoidal path and fits some splines to it. It can also take in a mate connect as an input to offset the center of the path.
Btw, this is my first featurescript, so excuse the probably terrible way that this was implemented.