gear - parametric gears

This Python package enables the creation of a wide variety of standard ISO (metric) involute spur gears. Involute gears have the advantage of continually meshing at a specific angle, known as the pressure angle, which prevents the stuttering that can occur with non-involute gears when the teeth lose contact.

_images/gears.png

Application Example

Imagine a telescope mount: involute gears allow the telescope to smoothly follow a star as it moves across the night sky, ensuring a steady image during long exposures. In contrast, non-involute gears might introduce vibrations that blur the image.

Ensuring Proper Gear Meshing

Gears must mesh properly to function effectively. Here are the guidelines to ensure proper meshing:

Tooth Shape and Size Consistency:

Meshing gears must have the same tooth shape and size. Use a common module for metric gears or a common diametral pitch value for imperial gears. For fully custom gears, ensure that the base, pitch, and outer radii are calculated correctly.

Proper Gear Separation:

When positioning two gears to mesh, they should be separated by the sum of their pitch radii. The separation can be calculated easily:

Multiply the gear module by the sum of the tooth count of both gears and divide by two.

\[\text{separation} = \text{module} \cdot \frac{n_0 + n_1}{2} [mm]\]

Example Code

from build123d import *
from bd_warehouse.gear import InvoluteToothProfile, SpurGear, SpurGearPlan

gear_tooth = InvoluteToothProfile(
        module=2,
        tooth_count=12,
        pressure_angle=14.5,
        root_fillet=0.5 * MM,
)

gear_profile = SpurGearPlan(
        module=2,
        tooth_count=12,
        pressure_angle=14.5,
        root_fillet=0.5 * MM,
)

spur_gear = SpurGear(
        module=2,
        tooth_count=12,
        pressure_angle=14.5,
        root_fillet=0.5 * MM,
        thickness=5 * MM,
)
class InvoluteToothProfile(module: float, tooth_count: int, pressure_angle: float, root_fillet: float | None = None, addendum: float | None = None, dedendum: float | None = None, closed: bool = False, mode: ~build123d.build_enums.Mode = <Mode.ADD>)[source]

The outline of a single involute tooth.

Parameters:
  • module (float) – the ratio of the pitch diameter to the number of teeth and is expressed in millimeters (mm)

  • tooth_count (int) – number of teeth in complete gear

  • pressure_angle (float) – the angle between the line of action (the line along which the force is transmitted between meshing gear teeth) and the tangent to the pitch circle. Common values are 14.5 or 20.

  • root_fillet (float) – radius of the fillet at the root of the tooth

  • addendum (float, optional) – the radial distance between the pitch circle and the top of the gear tooth. Defaults to None (calculated).

  • dedendum (float, optional) – the radial distance between the pitch circle and the bottom of the gear tooth space. It defines the depth of the space between gear teeth below the pitch circle. Defaults to None (calculated).

  • closed (bool, optional) – create a closed wire. Defaults to False.

  • mode (Mode, optional) – combination mode. Defaults to Mode.ADD.

class SpurGearPlan(module: float, tooth_count: int, pressure_angle: float, root_fillet: float | None = None, addendum: float | None = None, dedendum: float | None = None, rotation: float = 0, align: ~build123d.build_enums.Align | tuple[~build123d.build_enums.Align, ~build123d.build_enums.Align] = (<Align.CENTER>, <Align.CENTER>), mode: ~build123d.build_enums.Mode = <Mode.ADD>)[source]

InvoluteToothProfile

The 2D plan of the gear.

Parameters:
  • module (float) – the ratio of the pitch diameter to the number of teeth and is expressed in millimeters (mm)

  • tooth_count (int) – number of teeth in complete gear

  • pressure_angle (float) – the angle between the line of action (the line along which the force is transmitted between meshing gear teeth) and the tangent to the pitch circle. Common values are 14.5 or 20.

  • root_fillet (float) – radius of the fillet at the root of the tooth

  • addendum (float, optional) – the radial distance between the pitch circle and the top of the gear tooth. Defaults to None (calculated).

  • dedendum (float, optional) – the radial distance between the pitch circle and the bottom of the gear tooth space. It defines the depth of the space between gear teeth below the pitch circle. Defaults to None (calculated).

  • closed (bool, optional) – create a closed wire. Defaults to False.

  • align (Union[None, Align, tuple[Align, Align]], optional) – align min, center, or max of object. Defaults to (Align.CENTER, Align.CENTER).

  • mode (Mode, optional) – combination mode. Defaults to Mode.ADD.

class SpurGear(module: float, tooth_count: int, pressure_angle: float, thickness: float, root_fillet: float | None = None, addendum: float | None = None, dedendum: float | None = None, rotation: ~build123d.geometry.Rotation | tuple[float, float, float] = (0, 0, 0), align: None | ~build123d.build_enums.Align | tuple[~build123d.build_enums.Align, ~build123d.build_enums.Align, ~build123d.build_enums.Align] = <Align.CENTER>, mode: ~build123d.build_enums.Mode = <Mode.ADD>)[source]

InvoluteToothProfile

The 3D representation of the gear.

Parameters:
  • module (float) – the ratio of the pitch diameter to the number of teeth and is expressed in millimeters (mm)

  • tooth_count (int) – number of teeth in complete gear

  • pressure_angle (float) – the angle between the line of action (the line along which the force is transmitted between meshing gear teeth) and the tangent to the pitch circle. Common values are 14.5 or 20.

  • root_fillet (float) – radius of the fillet at the root of the tooth

  • thickness (float) – gear thickness

  • addendum (float, optional) – the radial distance between the pitch circle and the top of the gear tooth. Defaults to None (calculated).

  • dedendum (float, optional) – the radial distance between the pitch circle and the bottom of the gear tooth space. It defines the depth of the space between gear teeth below the pitch circle. Defaults to None (calculated).

  • closed (bool, optional) – create a closed wire. Defaults to False.

  • align (Union[None, Align, tuple[Align, Align, Align]], optional) – align min, center, or max of object. Defaults to Align.CENTER.

  • mode (Mode, optional) – combination mode. Defaults to Mode.ADD.