Parametric Cycloid Gear

My first attempt at a parametric object. The critical parameters that define a cycloid gear in this module are its circular pitch and number of teeth; the code then extrapolates other dimensions from there. As long as two gears have the same circular pitch they should mesh.

Please exercise the object and post here if you find any bugs! Will also post revisions to this Gist at GitHub.