gear - parametric gears

This Python package enables the creation of a wide variety of standard ISO metric-module involute spur, helical, rack, worm and bevel 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 and pressure angle. 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]\]

Spur Gears

InvoluteToothProfile is the outline of a single involute tooth, SpurGearPlan repeats it into the complete 2D gear and SpurGear extrudes the plan to a solid. All three share the same module, tooth_count, pressure_angle and optional root_fillet, addendum and dedendum parameters, and expose the calculated pitch_radius, base_radius, addendum_radius and root_radius.

from build123d import *
from bd_warehouse.gear import HelicalGear, 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,
)

Helical Gears

HelicalGear twists the spur gear plan through its thickness. Its module and pressure_angle can be given in either measurement plane, selected by module_system: "normal" (perpendicular to the tooth helix, the cutting tool convention) or "transverse" (perpendicular to the gear axis, which sets the pitch diameter directly as module * tooth_count). The two are related by transverse_module = normal_module / cos(helix_angle), and both values are available as attributes whichever was given. A positive helix_angle is a right-hand helix.

Parallel-axis helical gears mesh when they share the transverse module and pressure angle and have equal and opposite helix angles. Crossed-axis pairs, such as a worm and its wheel, use the same hand.

from bd_warehouse.gear import HelicalGear

helical_gear = HelicalGear(
        module=2,
        tooth_count=13,
        pressure_angle=20,
        helix_angle=45,
        thickness=10 * MM,
)

Rack Gears

A rack is the infinite-radius limit of an involute gear, so each tooth flank is a straight line at the transverse pressure angle. RackGearPlan is the 2D basic rack profile of tooth_count trapezoidal teeth on a rectangular body of base_height, with the pitch line on the X axis at Y = 0 and an exact pitch length of tooth_count * pi * transverse_module. RackGear extrudes the plan to thickness; a non-zero helix_angle skews the teeth linearly across the face width to mesh with a helical pinion. Like HelicalGear, rack dimensions can be given in the "normal" or "transverse" system.

A rack meshes with a spur or helical gear of the same module and pressure angle when its pitch line is one pitch radius from the gear axis.

from bd_warehouse.gear import RackGear, RackGearPlan

rack_plan = RackGearPlan(module=2, tooth_count=10, pressure_angle=20)
rack_gear = RackGear(
        module=2,
        tooth_count=10,
        pressure_angle=20,
        thickness=8 * MM,
        helix_angle=15,
)

Worm Gears

A worm drive pairs a screw-like worm with a worm wheel on shafts crossed at 90°, giving a large ratio (tooth_count / starts) in a compact package. The worm is defined by ISO 54 / DIN 3975 parameters: the axial module (which equals the wheel’s transverse module), the number of starts (threads) and the diametral_quotient q = reference diameter / module, from which the lead angle follows as tan(γ) = starts / q.

Two flank forms are provided. Both are exact ruled surfaces between helices of the worm’s lead, so WormFlank is a true helicoid rather than a swept approximation:

  • "ZI" (involute helicoid, the default) is the tangent developable of the base helix. Its transverse sections are circle involutes, making it the only form conjugate to an involute worm wheel.

  • "ZA" (Archimedean helicoid) has straight flanks at the axial pressure angle in every axial section, like a trapezoidal thread.

Worm assembles the flanks, the tip and root cylinders and the planar ends into a single solid directly, without sweeps or boolean operations, so a worm takes milliseconds to build and its transverse section matches the analytic tooth profile. WormWheel is a HelicalGear with the matching transverse module, helix angle equal to the worm lead angle and the same hand. WormGear positions both at the centre distance module * (q + tooth_count) / 2 with a thread space facing a wheel tooth.

from bd_warehouse.gear import Worm, WormGear, WormWheel

worm = Worm(module=2, starts=2, diametral_quotient=10, length=30)
wheel = WormWheel(module=2, tooth_count=30, thickness=12, starts=2, diametral_quotient=10)
worm_gear = WormGear(
        module=2,
        starts=2,
        diametral_quotient=10,
        tooth_count=30,
        worm_length=30,
        wheel_thickness=12,
)

This first version makes the following simplifications: the wheel is a plain (non-throated) helical gear, tooth proportions are standard (addendum module, dedendum 1.2 * module) with no profile shift, backlash or fillets, the worm ends are cut square, and the shaft angle is 90°.

Bevel and Miter Gears

Bevel gears transmit motion between shafts whose axes intersect, most often at 90°. BevelGear is a straight bevel gear with exact spherical-involute teeth built directly as a B-rep: the flanks are the true spherical involutes of the base cone rather than lofts between planar profiles, so a pair meshes at its pressure angle just as spur gears do.

A bevel gear is always one of a pair. module, pressure_angle, addendum and dedendum are specified at the outer (heel) end of the teeth, and the pitch cone angle follows from the two tooth counts and the shaft_angle:

\[\tan\delta = \frac{\sin\Sigma}{z_{mate}/z + \cos\Sigma}\]

so both gears of a pair share one cone distance and their face, pitch and root cones meet at a common apex, toward which the teeth taper. face_width is the tooth length along the pitch cone and is limited to one third of the cone distance, the standard design limit. The calculated geometry is available as attributes: pitch_cone_angle, cone_distance, pitch_diameter, outside_diameter, mounting_distance, apex and more.

The gear is placed with its axis on +Z, its back face on z = 0 and the teeth facing +Z; the pitch apex is at (0, 0, mounting_distance) and a tooth is centred on +X. mate_location returns the location that puts the mating gear in mesh - pitch apexes coincident, axes at the shaft angle, teeth phased - for any rotation of the first gear, so a pair can be posed at any angle:

from build123d import *
from bd_warehouse.gear import BevelGear, MiterGear, SphericalInvoluteToothProfile

pinion = BevelGear(module=2, tooth_count=16, mate_tooth_count=32, face_width=10)
gear = BevelGear(module=2, tooth_count=32, mate_tooth_count=16, face_width=10)
pair = Compound([pinion, pinion.mate_location(gear) * gear])

# turn the pinion 10 degrees; the gear follows at the conjugate angle
turned = Compound([Rot(0, 0, 10) * pinion, pinion.mate_location(gear, 10) * gear])

miter = MiterGear(module=2, tooth_count=20, face_width=9, bore_diameter=8)

tooth = SphericalInvoluteToothProfile(
        module=2, tooth_count=16, pitch_cone_angle=pinion.pitch_cone_angle
)

MiterGear is the equal-count special case: a 1:1 pair whose pitch cone angle is half the shaft angle (45° for the default 90° shafts); other shaft angles give angular miter gears. SphericalInvoluteToothProfile is the single-tooth outline developed onto the back cone, laid out like InvoluteToothProfile with the back-cone apex at the origin, and converges to the planar involute as the pitch cone angle approaches zero.

The default pressure angle is 20°, the ISO/AGMA standard; 14.5° (legacy inch-series designs), 22.5° (heavily loaded, slow drives) and 25° (recommended by AGMA for 12-13 tooth pinions, to avoid undercut) are also in use. Both gears of a pair must use the same value. Crown gears (90° pitch cone) and internal bevel gears are not supported.

class InvoluteToothProfile(*args, **kwargs)[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(*args, **kwargs)[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 (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(*args, **kwargs)[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 (Align | tuple[Align, Align, Align] | None, optional) – align min, center, or max of object. Defaults to Align.CENTER.

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

class HelicalGear(*args, **kwargs)[source]

A cylindrical involute gear with helical teeth.

Helical-gear module and pressure angle can be specified in either of two measurement planes:

  • "normal" means the plane perpendicular (normal) to the direction of a tooth helix. Here, “normal” is a geometric term and does not mean ordinary or default. Normal-system dimensions correspond to the rack or cutting-tool profile commonly used to manufacture the gear.

  • "transverse" means the plane perpendicular to the gear axis, equivalent to looking directly at the circular end of the gear. The transverse module determines pitch diameter directly: pitch_diameter = module * tooth_count.

For a helix angle β, the modules are related by transverse_module = normal_module / cos(β). The pressure angle is also converted between the selected normal or transverse plane. Catalogue gears may use either convention, so module_system should match the convention used by the source dimensions.

A positive helix angle produces a positive rotation about the Z axis through the gear thickness; a negative angle produces the opposite hand.

Parameters:
  • module (float) – normal or transverse module, as selected by module_system.

  • tooth_count (int) – number of teeth.

  • pressure_angle (float) – normal or transverse pressure angle, as selected by module_system.

  • helix_angle (float) – signed helix angle in degrees.

  • thickness (float) – gear face width.

  • module_system (Literal["normal", "transverse"], optional) – measurement plane for both module and pressure_angle. "normal" is perpendicular to the tooth helix; "transverse" is perpendicular to the gear axis. Defaults to “normal”.

  • root_fillet (float, optional) – radius of the tooth-root fillet.

  • addendum (float, optional) – radial addendum. When omitted, the module in the selected reference system is used.

  • dedendum (float, optional) – radial dedendum. When omitted, 1.25 times the module in the selected reference system is used.

  • rotation (RotationLike, optional) – object rotation. Defaults to (0, 0, 0).

  • align (Align | tuple[Align, Align, Align] | None, optional) – object alignment. Defaults to Align.CENTER.

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

class RackGearPlan(*args, **kwargs)[source]

Create a finite metric basic-rack profile in the transverse XY plane.

A rack tooth does not have a finite involute curve. It is the infinite-radius limiting form of an involute gear tooth, so each flank is a straight line at the transverse pressure angle. End boundaries lie on tooth-space centerlines, giving an exact pitch length of tooth_count * pi * transverse_module.

Parameters:
  • module – Normal or transverse metric module in millimeters, selected by module_system.

  • tooth_count – Number of complete teeth in the finite rack.

  • pressure_angle – Normal or transverse pressure angle in degrees, selected by module_system.

  • helix_angle – Signed rack tooth angle in degrees. Defaults to 0.

  • module_system – Measurement plane for module and pressure_angle. Defaults to "normal".

  • root_fillet – Optional radius of each concave tooth-root fillet. A value of zero leaves the roots unfilleted.

  • addendum – Tooth height above the pitch line. Defaults to module.

  • dedendum – Tooth depth below the pitch line. Defaults to 1.25 * module.

  • base_height – Material below the root line. Defaults to 2 * module.

  • rotation – In-plane rotation in degrees. Defaults to 0.

  • align – Build123d sketch alignment. Defaults to Y=0 at the pitch line.

  • mode – Build123d combination mode. Defaults to Mode.ADD.

Raises:

ValueError – If a dimension, angle, module system, or resulting tooth proportion is invalid.

class RackGear(*args, **kwargs)[source]

Create a finite straight or helical metric rack gear.

Parameters:
  • module – Normal or transverse metric module in millimeters, selected by module_system.

  • tooth_count – Number of complete rack teeth.

  • pressure_angle – Pressure angle in degrees in the selected measurement plane.

  • thickness – Rack face width along Y in millimeters.

  • helix_angle – Signed rack tooth angle in degrees. Defaults to 0.

  • module_system – Measurement plane for module and pressure_angle. Defaults to "normal".

  • root_fillet – Optional concave tooth-root fillet radius.

  • addendum – Tooth height above the pitch line. Defaults to module.

  • dedendum – Tooth depth below the pitch line. Defaults to 1.25 * module.

  • base_height – Material below the tooth root. Defaults to 2 * module.

  • rotation – Build123d object rotation. Defaults to no rotation.

  • align – Build123d part alignment. Defaults to Z=0 at pitch line.

  • mode – Build123d combination mode. Defaults to Mode.ADD.

Raises:

ValueError – If thickness or a rack-plan parameter is invalid.

class WormFlank(module: float, starts: int, diametral_quotient: float, length: float, pressure_angle: float = 20, flank_form: Literal['ZI', 'ZA'] = 'ZI', hand: Literal['right', 'left'] = 'right', side: Literal['lower', 'upper'] = 'lower', addendum: float | None = None, dedendum: float | None = None)[source]

The working flank surface of one worm thread.

Both supported flank forms are exact ruled surfaces between two helices of the worm’s lead, so the face is an OCCT ruled surface rather than a swept or lofted approximation. The tooth is centred on the +X axis at z = 0 and the face spans the axial length [-length/2, length/2].

Parameters:
  • module – Axial module in millimeters (equal to the worm wheel’s transverse module).

  • starts – Number of threads.

  • diametral_quotient – q = reference diameter / module (ISO 54). The lead angle follows from tan(γ) = starts / q.

  • length – Axial length of the flank.

  • pressure_angle – Normal pressure angle in degrees. Defaults to 20.

  • flank_form – "ZI" involute helicoid or "ZA" Archimedean helicoid. Defaults to "ZI".

  • hand – Thread hand. Defaults to "right".

  • side – "lower" is the flank facing −Z, "upper" the flank facing +Z. Defaults to "lower".

  • addendum – Radial addendum. Defaults to module.

  • dedendum – Radial dedendum. Defaults to 1.2 * module (DIN 3975).

Raises:

ValueError – If a parameter is invalid or the tooth proportions are impossible.

Note

A ZI flank exists only outside the base cylinder. When the root radius is smaller than the base radius the face starts at the base radius; Worm closes the tooth below it with a radial helicoid.

class Worm(*args, **kwargs)[source]

A cylindrical worm with ISO 54 / DIN 3975 proportions.

The worm is built as a single exact boundary representation: ruled-helicoid flanks (see WormFlank), cylindrical tip and root surfaces, and planar ends — no sweeps or boolean operations are involved, so construction takes milliseconds and the transverse section matches the analytic tooth profile. The axis is Z, the part is centred on the origin, and thread 0 is centred on the +X axis at z = 0.

Parameters:
  • module – Axial module in millimeters (equal to the worm wheel’s transverse module).

  • starts – Number of threads.

  • diametral_quotient – q = reference diameter / module (ISO 54); typical values are 8 to 12. The lead angle follows from tan(γ) = starts / q.

  • length – Axial length of the worm.

  • pressure_angle – Normal pressure angle in degrees. Defaults to 20.

  • flank_form – "ZI" involute helicoid (conjugate to an involute worm wheel) or "ZA" Archimedean helicoid. Defaults to "ZI".

  • hand – Thread hand. Defaults to "right".

  • addendum – Radial addendum. Defaults to module.

  • dedendum – Radial dedendum. Defaults to 1.2 * module (DIN 3975).

  • rotation – Build123d object rotation. Defaults to no rotation.

  • align – Build123d part alignment. Defaults to Align.CENTER.

  • mode – Build123d combination mode. Defaults to Mode.ADD.

Raises:

ValueError – If a parameter is invalid or the tooth proportions are impossible.

class WormWheel(*args, **kwargs)[source]

A worm wheel: an involute helical gear matched to a Worm.

For a 90° shaft angle the wheel’s transverse module equals the worm’s axial module, its helix angle equals the worm’s lead angle (same hand), and its transverse pressure angle equals the worm’s axial pressure angle. This is a plain (non-throated) wheel, exactly conjugate to a "ZI" worm.

Parameters:
  • module – Worm axial module = wheel transverse module in millimeters.

  • tooth_count – Number of wheel teeth.

  • thickness – Wheel face width.

  • starts – Number of worm threads. Defaults to 1.

  • diametral_quotient – Worm q = reference diameter / module. Defaults to 10.

  • pressure_angle – Normal pressure angle in degrees. Defaults to 20.

  • hand – Hand of the worm and wheel. Defaults to "right".

  • root_fillet – Optional radius of the tooth-root fillet.

  • addendum – Radial addendum. Defaults to module.

  • dedendum – Radial dedendum. Defaults to 1.2 * module (DIN 3975).

  • rotation – Build123d object rotation. Defaults to no rotation.

  • align – Build123d part alignment. Defaults to Align.CENTER.

  • mode – Build123d combination mode. Defaults to Mode.ADD.

class WormGear(module: float, starts: int, diametral_quotient: float, tooth_count: int, worm_length: float, wheel_thickness: float, pressure_angle: float = 20, flank_form: Literal['ZI', 'ZA'] = 'ZI', hand: Literal['right', 'left'] = 'right', root_fillet: float | None = None)[source]

Assembly: a Worm meshed with a WormWheel at a 90° shaft angle.

The wheel is centred on the origin with its axis along Z; the worm axis is parallel to Y through (center_distance, 0, 0) with a thread space facing the wheel tooth on the +X axis. RigidJoint “wheel” and “worm” mark the two axes.

Parameters:
  • module – Worm axial module = wheel transverse module in millimeters.

  • starts – Number of worm threads.

  • diametral_quotient – Worm q = reference diameter / module.

  • tooth_count – Number of wheel teeth.

  • worm_length – Axial length of the worm.

  • wheel_thickness – Wheel face width.

  • pressure_angle – Normal pressure angle in degrees. Defaults to 20.

  • flank_form – Worm flank form. Defaults to "ZI".

  • hand – Hand of the worm and wheel. Defaults to "right".

  • root_fillet – Optional wheel tooth-root fillet radius.

class SphericalInvoluteToothProfile(*args, **kwargs)[source]

The outline of a single straight-bevel tooth with exact spherical-involute flanks, developed onto the plane of the back cone.

The output has the same layout as InvoluteToothProfile: the origin is the back-cone apex, the tooth is centred on +X, radii are slant distances along the back cone and the profile spans one angular pitch of the developed back cone, 2 * pi / virtual_tooth_count, with half a root arc on each side. As pitch_cone_angle approaches zero the profile converges to the planar involute of InvoluteToothProfile(module, virtual_tooth_count, ...).

Parameters:
  • module (float) – module at the outer (heel) end of the tooth, in millimeters.

  • tooth_count (int) – number of teeth of the bevel gear.

  • pitch_cone_angle (float) – pitch cone half angle in degrees, in (0, 90).

  • pressure_angle (float, optional) – pressure angle in degrees, in (0, 90). Defaults to 20, the ISO/AGMA standard. See BevelGear for other common values.

  • root_fillet (float, optional) – radius of the fillet at the root of the tooth. Defaults to None.

  • addendum (float, optional) – tooth height above the pitch cone at the heel, measured along the back cone. Defaults to None (module).

  • dedendum (float, optional) – tooth depth below the pitch cone at the heel, measured along the back cone. Defaults to None (1.25 * module).

  • closed (bool, optional) – close the wire across the tooth space. Defaults to False.

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

Raises:

ValueError – invalid dimensions or angles, pointed teeth, no tooth space at the root, or a root fillet that is too large.

class BevelGear(*args, **kwargs)[source]

A straight bevel gear with exact spherical-involute teeth, built directly as a B-rep.

Module, pressure angle, addendum and dedendum are specified at the outer (heel) end of the teeth. The pitch cone angle follows from the tooth counts of the pair and the shaft angle, tan(delta) = sin(shaft) / (z_mate / z + cos(shaft)), so the two gears of a pair share one cone distance. Face, pitch and root cones share the cone apex; the teeth taper toward it.

Placement: the gear axis is +Z, the back face lies on z = 0 and the teeth face +Z. The pitch cone apex is at apex = (0, 0, mounting_distance) and a tooth is centred on +X. Use mate_location() to position the mating gear.

Parameters:
  • module (float) – module at the heel, in millimeters.

  • tooth_count (int) – number of teeth on this gear.

  • mate_tooth_count (int) – number of teeth on the mating gear.

  • face_width (float) – tooth length along the pitch cone generator. At most one third of cone_distance (standard design limit).

  • pressure_angle (float, optional) –

    pressure angle in degrees, in (0, 90). Both gears of a pair must use the same value. Defaults to 20, the ISO/AGMA standard and the usual catalogue value. Other values in use:

    • 14.5: legacy (mainly inch-series) designs; smoother and quieter, but weaker and more prone to undercut at low tooth counts.

    • 17.5: occasionally used for quieter running.

    • 22.5: heavily loaded, slow-speed drives.

    • 25: higher tooth strength and less undercut; recommended by AGMA for straight bevel gears with very few (12-13) teeth.

  • shaft_angle (float, optional) – angle between the two gear axes in degrees, in (0, 180). Defaults to 90.

  • root_fillet (float, optional) – radius of the tooth-root fillet at the heel. Defaults to None.

  • addendum (float, optional) – heel addendum along the back cone. Defaults to None (module).

  • dedendum (float, optional) – heel dedendum along the back cone. Defaults to None (1.25 * module).

  • bore_diameter (float, optional) – diameter of a through bore on the axis. Defaults to None (solid).

  • back_cone_width (float, optional) – slant width of the back-cone band below the heel root, ending at the flat back face. Defaults to None (1.5 * module).

  • front_cone_width (float, optional) – slant width of the front-cone band below the toe root, ending at the flat front face. Defaults to None (0.5 * module).

  • rotation (RotationLike, optional) – object rotation. Defaults to (0, 0, 0).

  • align (Align | tuple[Align, Align, Align] | None, optional) – object alignment. Defaults to None, which keeps the placement described above.

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

Raises:

ValueError – invalid input, unsupported (crown or internal) cone angle, or a blank whose faces would not form a closed shell.

mate_location(mate: BevelGear, angle: float = 0.0) → Location[source]

Location that places mate in mesh with this gear.

Both gears must be in their default placement (rotation=(0, 0, 0), align=None). The pitch apexes coincide, the mate’s axis lies in the XZ plane at shaft_angle to this gear’s axis on the +X side, and the mate is phased so that a tooth space receives this gear’s tooth on +X.

Parameters:
  • mate (BevelGear) – the mating gear.

  • angle (float, optional) – rotation of this gear about its axis in degrees, i.e. this gear is placed with Rot(0, 0, angle). The mate is turned by the conjugate -angle * z / z_mate. Defaults to 0.

Raises:

ValueError – the gears are not a mating pair.

Returns:

location to apply to mate.

Return type:

Location

class MiterGear(*args, **kwargs)[source]

A straight bevel gear that meshes with an identical gear: equal tooth counts, so a 1:1 ratio. With the default 90 degree shaft angle the pitch cone angle is 45 degrees; other shaft angles give angular miter gears. See BevelGear for the placement convention, the common pressure angles and the remaining arguments.

Parameters:
  • module (float) – module at the heel, in millimeters.

  • tooth_count (int) – number of teeth on each gear of the pair.

  • face_width (float) – tooth length along the pitch cone generator.

  • pressure_angle (float, optional) – pressure angle in degrees. Defaults to 20.

  • shaft_angle (float, optional) – angle between the axes in degrees. Defaults to 90.