Adjust gear meshing in renders
There is a bug in the rendering that makes the motor shaft not fit correctly in the small gear, #434 (closed).
As well as this, the small gear rotation is hard coded as 15 degrees (half a tooth of a 12-tooth gear), which is only correct for the 2:1 gear ratio. To make this rotation automatic the half-tooth rotation needs to be calculated, not hard-coded. The small and large gears also need a base rotation so that the 'index tooth' (for an arbitrary number of teeth the gear code always starts from a tooth aligned with +x) is pointing the the direction of the other gear, before the half-tooth rotation is applied to the small gear.
-
Add a motor shaft rotation in the motor render to allow correct motor shaft rotation to match the small gear. -
Make the small and large gears mesh correctly for all gear ratios. Previously this only worked for the ratio of 2. Now works for all ratios, including odd numbers of teeth on the gears (ready for !352 (merged)).
closes #434 (closed)
Edited by William Wadsworth