Gears

⚙️ Spec sheet →  —  visual schematic and metrics measured from a real rendered STL.

Pure-Python port of BOSL2’s current gears.scad. Gears are sized by circular pitch (circ_pitch), metric mod, or diam_pitch; the 20-degree pressure_angle and profile_shift="auto" defaults match BOSL2, so low-tooth-count gears automatically get the profile shift that avoids undercut. The involute spur teeth are rack-generated – the working involute flank plus the trochoid a meshing rack would carve – so low-tooth gears show a real undercut.

Includes the involute spur_gear2d() / spur_gear() (helical and/or herringbone), the internal ring_gear(), the linear rack(), the bevel_gear(), the worm() / worm_gear() pair, the dimension helpers, auto_profile_shift(), and gear_dist() for the meshing centre distance. .. autoclass:: bosl2.gears.Gears

members:

Examples

These mirror the examples in BOSL2’s gears.scad, rendered live through PythonSCAD. Examples that rely on BOSL2’s attachment/anchor system, or on features not in this port, are omitted.

spur_gear

A spur gear by circular pitch:

Gears.spur_gear(circ_pitch=5, teeth=20, thickness=8, shaft_diam=5).show()

⬇ Download STL mesh

By metric module:

Gears.spur_gear(mod=2, teeth=20, thickness=8, shaft_diam=5).show()

⬇ Download STL mesh

A helical gear:

Gears.spur_gear(circ_pitch=5, teeth=20, thickness=10, shaft_diam=5, helical=-30, slices=12).show()

⬇ Download STL mesh

A herringbone gear:

Gears.spur_gear(circ_pitch=5, teeth=20, thickness=10, shaft_diam=5, helical=30, herringbone=True, slices=5).show()

⬇ Download STL mesh

ring_gear

An internal ring gear:

Gears.ring_gear(circ_pitch=5, teeth=48, thickness=10).show()

⬇ Download STL mesh

Thicker backing:

Gears.ring_gear(circ_pitch=5, teeth=48, thickness=10, backing=30).show()

⬇ Download STL mesh

A higher pressure angle:

Gears.ring_gear(circ_pitch=5, teeth=48, thickness=10, pressure_angle=28).show()

⬇ Download STL mesh

With a profile shift:

Gears.ring_gear(circ_pitch=5, teeth=48, thickness=10, profile_shift=0.5).show()

⬇ Download STL mesh

Helical:

Gears.ring_gear(circ_pitch=5, teeth=48, thickness=15, helical=30).show()

⬇ Download STL mesh

rack

A linear rack:

Gears.rack(pitch=5, teeth=10, thickness=5).show()

⬇ Download STL mesh

A rack at 14.5 deg pressure angle:

Gears.rack(mod=2, teeth=10, thickness=5, pressure_angle=14.5).show()

⬇ Download STL mesh

bevel_gear

A 45 deg bevel gear:

Gears.bevel_gear(circ_pitch=5, teeth=36, mate_teeth=36, shaft_diam=5).show()

⬇ Download STL mesh

By module:

Gears.bevel_gear(mod=4, teeth=20, face_width=10, pitch_angle=45, shaft_diam=6).show()

⬇ Download STL mesh

worm

A single-start worm:

Gears.worm(circ_pitch=8, diameter=30, length=50).show()

⬇ Download STL mesh

A 3-start worm:

Gears.worm(circ_pitch=8, diameter=30, length=50, starts=3).show()

⬇ Download STL mesh

A left-handed 3-start worm:

Gears.worm(circ_pitch=8, diameter=30, length=50, starts=3, left_handed=True).show()

⬇ Download STL mesh

worm_gear

A worm gear:

Gears.worm_gear(circ_pitch=5, teeth=36, worm_diam=30, worm_starts=1).show()

⬇ Download STL mesh

Left-handed:

Gears.worm_gear(circ_pitch=5, teeth=36, worm_diam=30, worm_starts=1, left_handed=True).show()

⬇ Download STL mesh

Meshing a 4-start worm:

Gears.worm_gear(circ_pitch=5, teeth=36, worm_diam=30, worm_starts=4).show()

⬇ Download STL mesh

By module:

Gears.worm_gear(mod=2, teeth=32, worm_diam=30, worm_starts=1).show()

⬇ Download STL mesh