Parametric Helical Gear Generator

Hi,
Here is a fully parametric gear generator, with variable defined helix angle, teeth number, modulus, pressure angle, backlash, teeth offset, gear form factor, number of fillet per turn for the worm, etc. :grinning_face:

Variables defined helical gear v2.14.shapr (11.8 MB)


The generator creates left and right versions of the gears, either centered with one tooth aligned up (for 3D printing or exporting into other projects) or meshed together and “animated” with the “rot” variable to check for functional interferences.

Worm is created only when helix angle beta is not zero degree. When beta equals zero, gears are spur gears.

Video below demonstrates most of the features.

The key thing to understand regarding helical gears is the fact that helical gears are defined using normal parameters but are drawn using tangential parameters.
Normal parameters are measured in a plane perpendicular to a tooth while tangential parameters are measured in a plane parallel to the side of the gear.


To try to visualise things, it is helpful to remind that a gear can mesh with a rack, so the gear and the rack share the same parameters (pressure angle, modulus, etc). We could manufacture a gear using a (sharp) rack as the tool:

  • slide the rack to “cut” one tooth
  • rotate the gear to be manufactured by 1/10 of the tooth
  • translate the rack by 1/10 of the pitch
  • repeat the process

_SpurGearcutting-resize

For spur gears, normal and tangential planes are equal because the teeth are perpendicular to the side of the gear.

Now, using the same exact rack and movement, we just rotate the rack around the vertical axis by an angle beta : we get an helical gear with an helix angle beta.

_HelicalGearcutting-resize

Because we are using the same rack, normal parameters measured perpendicular to the rack’s teeth are exactly the same as for the spur gear, because the rack has not changed.

This is the reason why helical gears are defined by normal parameters.

But the angle beta by which we rotated the rack changes the tangential parameters measured along the side of the gear: as a result, we must compute the tangential parameters to be able to sketch the helical gear, and we can now do it with variables and expressions.


There were a few challenges to solve in order to create this generator.

  • First challenge was to keep the history clean (error free) whatever the parameters’ value (25 parameters, 50 computed variables and about 100 history’s steps :sweat_smile:).

  • Second challenge was to automatically delete the worm when the helix angle Beta is null, because in theory worm cannot mesh with spur gear without backlash. Not so easy without boolean variable nor conditional step’s execution.

  • Third challenge was to recreate trigonometry functions (sin, cos, tan, acos, atan) with enough accuracy using Taylor’s series, and was a good test for variables. Here is an exemple :exploding_head:

theta1_ba = r2d * (Pi / 2 + d1_b / d1_a * (-1 + d1_b / d1_a * d1_b / d1_a * (-1 / 6 + d1_b / d1_a * d1_b / d1_a * (-3 / 40 + d1_b / d1_a * d1_b / d1_a * (-5 / 112 + d1_b / d1_a * d1_b / d1_a * (-35 / 1152 + d1_b / d1_a * d1_b / d1_a * (-63 / 2816 + d1_b / d1_a * d1_b / d1_a * (-231 / 13312 + d1_b / d1_a * d1_b / d1_a * (-143 / 10240 + d1_b / d1_a * d1_b / d1_a * (-6435 / 557056))))))))))` 

Some technical documentation is embedded into the .shapr’s workspace using images, as a substitute to notes.

Parameters’ definition:

Equations to compute the gears:
There are some interesting things such as is_beta_null variable, which is a -crazy- way to overcome the miss of boolean variables, or the addition of 1e-6 deg to gamma variables to force revolve tool to operate as extrude tool when beta is null, because we do not have conditional execution at present.

Gears’ parameters


Rack’s parameters

Worm’s parameters

Helix angle Beta: from spur gear to helical gear
animated gears beta loop

Worm: impact of number of fillet per turn
animated gears Zv loop

Meshing with 0 backlash
animated gears meshing

Pressure angle impact on teeth’s shape
animated alpha_t loop

Teeth number impact on teeth shape
animated gears Z loop

Backlash variation
animated gears backlash loop

Teeth’s offset impact on teeth’s shape and gears’ center distance

  • sum of offset equals 0 : no impact on centers distance
    animated gears cst distance loop

  • sum of offset not equals 0 : impact on centers distance
    animated gears var distance loop

Teeth offset can solve functional interferences when low teeth count
animated gears interferences loop

3 points control spline computation to approximate involute of a circle

9 Likes

This is amazing work, @PEC! Thank you for sharing!

1 Like

Thank you sooo much, this is awesome! I‘ve been trying to create gears for years now, with only moderate success. I only have a few questions:

Are you going to create a Generator with the option for Bevel Gears?

How relevant are all the parameters like teeth size, chamfer etc. for the final result? E. G. Which parameters are useful on which settings for which use cases?

Thanks for helping us, this is really useful!

1 Like

Hi @GroMark

I will probably add Bevel Gears support in the future, but only when we will have trigonometry functions available, because at present, a significant part of the work is to recreate sin, cos, tan and inverse trig functions asin, acos, atan. I miss also sqrt and pow functions… With bevel gears, you have more angles to deal with.

To answer your second question, I tried to group parameters by order of importance.

  • 0 : teeth number : be careful with low teeth count (8 to 15 teeth) for Z1-Z2 as it may lead to functional interferences depending on the teeth count of the meshing gear (this is not inaccuracy of the generator). With 17 teeth or more, there is theoretically no functional interference
  • 1 : beta : must match the other gear to mesh with. Right gear meshes with a left gear if you want the axes to be parallel. If you don’t, you will end with a Screw Gear (Crossed Helical Gear), which is fine but load capacity is limited (because of contact point instead of line contact)
  • 2 : modulus m_n : this is the “size of the tooth”, and it is standardized (Gear - Wikipedia).
    0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.5, 3, 4, 5, 6, 8, 10 (…) mm
    3D printing with a 0.4mm nozzle on my Prusa MK4, m_n = 0.5mm is the minimum reasonable value; 0.8mm is very good
  • 3 : pressure angle alpha_n : this is standardized, keep 20° unless you have a good reason to change, such as meshing with an existing gear that has a different pressure angle or functional interferences that cannot be fixed by teeth’s offset
  • 4 : tooth height : this is standardized, don’t change it unless you have a good reason
  • 5 : backlash : this is the clearance required for the gears to mesh. It depends on the manufacturing process. For 3D printing with 0.4mm nozzle, 0.1mm to 0.2mm works good for me
  • 6 : teeth offset : keep it to zero unless you have a good reason to change. This is a more advanced parameter which has several purpose:
    ° adjust the center distance between two gears without changing teeth count, modulus or helix angle; center distance is modified when x1+x2 ≠ 0 (for gears 1 and 2)
    ° fix functional interferences in case pinion has a low teeth count
    ° fix tooth geometry; eg increase tooth’s resistance when the base of the tooth is too thin in case of low teeth count
  • 7 : teeth_fillets : on the negative side, it reduces the useful length of the tooth’s profile but on the positive side, it breaks sharp angle and it helps reducing functional interferences. For 3D printed gears, I usually use 0.1 to 0.2
  • 8 : teeth_chamfer and axle_chamfer : teeth_chamfer prevents machining burr to interfere with meshing. Not mandatory for 3D printing in my experience.
    For visualization, chamfer and fillets are great because they catch the light and are indeed mandatory to get a nice rendering.
  • 9 : b, w, d_axle : no impact on teeth’s geometry but define gears

Thank you, this is great!