Gears / cogwheels
click for short animation I wanted a way to create mechanical gears (cogwheels) in a fast and flexible way. A couple of years ago, Stefano Selleri created a script that is versatile and mechanically accurate. A fine piece of work and a great inspiration, but for me there were some additional design criteria : The mesh should be
- as low poly as possible while still looking good,
- responding well to subsurface modifiers
- easy to tweak/refine
- easy to maintain
- a Add->Mesh menu item
Installation
- place the script add_mesh_gears.py in your .blender/scripts directory,
- start Blender (you need 2.47 with python 2.5 although 2.46 might work as well)
Usage
On running the script you're presented with the following popup:
The default settings generate a gear like this:
Many aspects can be altered however:
Teeth the number of teeth, equally spaced along the radius of the gear. Less than 5 is treated special: this will create a wormwheel. See below for details.
Radius The radius of the gear. Gears that interact should be tangent (= touching each other) on their radii. See the section on animation for details. Usually if two gears are touching, then the ratio between the radii is same as the ratio between the number of teeth. This guarantees that the teeth on both gears are equal in size (neccessary for smooth running ) A negative radius creates an inverted gear (a gear with teeth on the inside).
Addendum The amount the tip of a tooth extends above the radius
Dedendum The amount the through between two teeth extends below the radius
Base The thickness of the rim of the gear
Width The thickness of the gear
Pressure angle The slope of the tip of the teeth
Helical angle Teeth don't have to be perpendicular to the face of the gear. This angle determines the skew.
Conical angle Conical gears can be used to link non parallel axes. This angle determines the taper. E.g. 45 degrees can be used for perpendicular axes.
Rack Toggle this to get a single tooth that can be extended
to a rack by an array modifier.
Crown A nonzero value creates a crownwheel (a gear
with teeth that point downward)
The next few parameters control the way the
inner part of the gear is modelled. This is
mainly a matter of taste and these parameters should
be considered experimental. They might not work, actually, I guarantee them NOT to work :-)
Teeth per Spoke
Spoke Bevel
Spoke Width
Spoke Length
To get a better idea of all those parameters, here's a schematic:
Vertex Groups
To facilitate tweaking the generated mesh a number of vertex groups are predefined. That way it is easy to select similar but unconnected edges, e.g. to crease them.
Wormwheels
A number of teeth less than 5 creates a single turn of a wormwheel. (which can be simply extended by an array modifier):
Internal gears
Negative radii create internal gears. An example :
Crownwheels
Crownwheels are possible as well. An example :
Racks
Racks are basically straight strips of teeth. If you select the 'Rack' toggle a single tooth is created that may be repeated by applying an array modifier in the y direction.
Animation
- place the two gears with their radii touching
- rotate one of them so that the teeth mesh properly
- key that rotation at frame 1
- go forward 1 second (= frame 26 if the framerate is 25 f/s)
- rotate the same gear the number of degrees it will turn in 1 second and key that rotation
- set the extrapolation of the curve to 'linear'
- drive the rotation of the second gear by creating a new IPO and referenci
