Ok - So I've managed to do what I originally wanted..
I'm in the process of making a clock and wanted to have some 'proper' drawings of all the various components before I actually attempt to make them (another skill altogether!).
Clock wheels and pinions are quite different when compared with 'normal' involute gears. Strictly, the tooth apex should be formed as a cycloid curve but these are difficult to calculate and the British Standard (978 Part 2: Cycloidal Type Gears) takes a shortcut by defining the gear apex as a circular curve. However, calculating this curve (and taking into account some 'tweaks') is an iterative process that tends toward an acceptable error level. For details see the compute and addendum_factor functions in CycloidalGearModule. Having calculated the addendum factor, and with the module, the wheel pitch diameter can be determined together with the addendum radius (radius of curve at gear tip.).
The next problem is calculating the positions of the lines and curves that make up the tooth profile. The only difficult one is the location of the addendum curve centre point. Because the positions of the tooth apex, the end of the curve and the curve radius are known it is possible to calculate two possible locations for the curve centre point. The correct point lies within the wheel pitch circle diameter. See addendum_radius_centre and is_point_within_wheel for details.
I've attached a zip containing the relevant python code. The script CycloidalGearRunner is the entry point. You will be prompted to enter the Module (this is the standard metric measure of tooth profile. The wheel tooth count, the meshing pinion tooth count and the plane for the sketch.
Problems I have...
It is slow... I know there are a few calculations but why this slow?
Why can't I use SketchPoint on the CycloidalGear class? Every time I try I get an error: 'NameError: global name 'SketchPoint' is not defined'
Anyway that's all for now.. Back to the lathe.
David B