Sign in with STEVE

steve/gear-rack

Straight gear rack, ISO 53 basic rack, modules 0.5 to 2, any length, with common lengths as presets.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 42 lines · Python · STEVE runtime · checked
Download
1"""Straight-tooth gear rack, ISO 53 basic rack, section from KHK's SR steel racks. Length along X, centred on the origin;
2width along Y; base on the XY plane and teeth up along +Z. As many whole teeth as fit the length, centred, with the
3tooth roots' level running to both ends. Height H is the pitch-line height H0 plus one module."""
4import math
5
6from steve import Model
7
8module = 1 # Module
9length = 300 # mm Rack length
10
11PRESSURE_ANGLE = 20 # degrees: ISO 53:1998 basic rack
12DEDENDUM = 1.25 # x module: ISO 53
13# module: (face width B, overall height H, height to the pitch line H0). KHK Gears catalogue 2025, Racks, SR steel racks
14# table, https://khkgears.us/media/yzroimcg/catalog-2025-racks.pdf
15RACKS = {0.5: (5, 12, 11.5), 0.8: (8, 12.3, 11.5), 1: (10, 12, 11), 1.5: (15, 20, 18.5), 2: (20, 25, 23)}
16
17MAX_TEETH = 260 # more teeth than this take longer to build than a build is allowed
18
19B, H, H0 = RACKS[module]
20pitch = math.pi * module
21count = int(length // pitch)
22if count < 1:
23 raise ValueError(f"The rack must be at least one pitch ({pitch:.3f} mm) long.")
24if count > MAX_TEETH:
25 raise ValueError(f"{count} teeth is too long to build: at most {MAX_TEETH} teeth ({MAX_TEETH * pitch:.0f} mm at this module).")
26tan_a = math.tan(math.radians(PRESSURE_ANGLE))
27root_z = H0 - DEDENDUM * module
28crest_half = pitch / 4 - module * tan_a
29root_half = pitch / 4 + DEDENDUM * module * tan_a
30points = [(-length / 2, 0), (length / 2, 0), (length / 2, root_z)]
31for i in reversed(range(count)):
32 x = (i - (count - 1) / 2) * pitch
33 points += [(x + root_half, root_z), (x + crest_half, H), (x - crest_half, H), (x - root_half, root_z)]
34points.append((-length / 2, root_z))
35
36model = Model()
37with model.sketch("rack_sketch", on="XZ", name="Rack section") as sk:
38 sk.polyline("profile", points, closed=True)
39model.extrude("rack", "rack_sketch", distance=B, both=True, name="Rack")
40model.material("steel-generic", color="#b4b8bd")
41result = model.result()
42

Straight-tooth rack with teeth cut from the ISO 53 basic rack and a section from a maker's public catalogue. Length along X, centred on the origin; teeth up along +Z. See the README; not affiliated with any maker.

Gear rack

Straight-tooth rack. Length along X, centred on the origin; width along Y; base on the XY plane, teeth up along +Z.

Geometry

As many whole teeth as fit the length, centred, at pitch π m, with the root level running on to both ends. Tooth thickness π m / 2 on the pitch line, 20° flanks, addendum 1.0 m, dedendum 1.25 m.

Source

Module Face width B Height H Height to pitch line H0
0.5 5 12 11.5
0.8 8 12.3 11.5
1 10 12 11
1.5 15 20 18.5
2 20 25 23

Module 1.25 isn't in that table, so it isn't offered. A rack is limited to 260 teeth: longer ones take more than a build's time limit. The catalogue's preset widths differ for some modules: this part uses the KHK section. Maker names identify the source; this part isn't made by or affiliated with KHK.

Preset lengths: step.parts catalogue metadata (MIT, library/NOTICE.md).

  1. 1.0.0 Latest
More #gear
STEVEMIT

steve/spur-gear

Involute spur gear, ISO 53 basic rack, ISO 54 modules 0.5 to 2: teeth, bore and width as presets.

0 300 sizes 0 41 minutes ago v1.0.0
STEVEMIT

steve/miter-gear

Straight miter gear (1:1 bevel, 90 degree) envelope, modules 1 to 3, with catalogue numbers as presets.

1 22 sizes 0 1 hour ago v1.1.0
STEVEMIT

steve/shaft-collar

Shaft collar: DIN 705 A set collar, bores 3 to 20 mm, and one-piece clamp collars.

0 12 sizes 0 3 hours ago v1.0.0
STEVEMIT

steve/parallel-key

Parallel key, DIN 6885-1 form A, 2 x 2 to 12 x 8, any length, with the common sizes as presets.

0 46 sizes 0 3 hours ago v1.0.0