Sign in with STEVE

steve/miter-gear

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

v1.1.0 Latest STEVE MIT 0
Isometric
part.py 82 lines · Python · STEVE runtime · checked
Download
1"""Straight miter gear (ratio 1:1), KHK SM series. The outline is the published one: hub of diameter B and width H on the XY plane, the back cone out to the outside diameter D
2at G above the back (the crown), a 45 degree tip cone up to the total length F, and the bore A through. detail = "full" cuts the teeth into it: each gap runs along the pitch cone
3to the apex, its section computed with Tredgold's approximation (the involute of the equivalent spur gear of z / cos 45 degrees teeth, ISO 53 proportions). This is close for looks and
4fits, not a tooth-contact model. detail = "simple" keeps the teeth filled in. Axis along Z; the back is on the XY plane."""
5import math
6
7from steve import Model
8
9
10designation = "SM1-20" # Catalogue number
11detail = "full" # full: real teeth; simple: the outline with the teeth filled in
12
13# number: (module, teeth, bore A, hub diameter B, outside diameter D, total length F, crown to back G, hub width H).
14# KHK Gears catalogue 2025, Miter Gears, SM table, PDF p. 26, https://khkgears.us/media/lblpmezm/catalog-2025-miter-gears.pdf
15GEARS = {
16 "SM1-20": (1, 20, 6, 16, 21.41, 13.94, 10.71, 8),
17 "SM1-25": (1, 25, 6, 20, 26.41, 15.16, 11.21, 8),
18 "SM1-30": (1, 30, 8, 24, 31.41, 17.71, 13.71, 10),
19 "SM1.25-20": (1.25, 20, 8, 22, 26.77, 15.27, 11.38, 9),
20 "SM1.25-25": (1.25, 25, 8, 25, 33.02, 17.88, 13.26, 9.25),
21 "SM1.25-30": (1.25, 30, 10, 30, 39.27, 23.47, 18.13, 13.5),
22 "SM1.5-20": (1.5, 20, 8, 26, 32.12, 21.24, 16.06, 13),
23 "SM1.5-25": (1.5, 25, 10, 30, 39.62, 22.25, 16.31, 11.5),
24 "SM1.5-30": (1.5, 30, 10, 36, 47.12, 28.24, 21.56, 16),
25 "SM2-16": (2, 16, 10, 27, 34.83, 19, 15.41, 11.5),
26 "SM2-20": (2, 20, 12, 34, 42.83, 24.89, 18.41, 14),
27 "SM2-25": (2, 25, 12, 40, 52.83, 24.33, 16.41, 10),
28 "SM2-30": (2, 30, 12, 45, 62.83, 29.42, 21.41, 12.5),
29 "SM2.5-16": (2.5, 16, 12, 34, 43.53, 21, 16.77, 12),
30 "SM2.5-20": (2.5, 20, 14, 42, 53.54, 32.54, 24.77, 19),
31 "SM2.5-25": (2.5, 25, 16, 50, 66.04, 30.41, 20.52, 12.5),
32 "SM2.5-30": (2.5, 30, 16, 60, 78.54, 36.28, 26.27, 17),
33 "SM3-16": (3, 16, 14, 42, 52.24, 23, 18.12, 13),
34 "SM3-20": (3, 20, 16, 50, 64.24, 39.84, 30.12, 23),
35 "SM3-25": (3, 25, 20, 60, 79.24, 37.81, 24.62, 15),
36 "SM3-30": (3, 30, 20, 70, 94.24, 45.47, 32.12, 20),
37}
38
39module, teeth, A, B, D, F, G, H = GEARS[designation]
40tip_radius = D / 2 - (F - G)
41model = Model()
42with model.sketch("outline", on="XZ", name="Outline") as sk:
43 sk.polyline("profile", [(A / 2, 0), (B / 2, 0), (B / 2, H), (D / 2, G), (tip_radius, F), (A / 2, F)], closed=True)
44model.revolve("gear", "outline", axis="Z", name="Gear")
45if detail == "full":
46 pressure = math.radians(20)
47 cone = math.radians(45)
48 pitch_r = module * teeth / 2
49 equivalent = pitch_r / math.cos(cone)
50 base = equivalent * math.cos(pressure)
51 root_r = pitch_r - 1.25 * module * math.cos(cone)
52 apex = G + D / 2
53
54
55 def involute(angle):
56 return math.tan(angle) - angle
57
58
59 def half_gap(r):
60 rho = equivalent + (r - pitch_r) / math.cos(cone)
61 angle = math.acos(base / rho) if rho > base else 0
62 half_tooth = (math.pi / (2 * teeth / math.cos(cone)) + involute(pressure) - involute(angle)) * rho / r
63 return math.pi / teeth - half_tooth
64
65
66 top_r = D / 2
67 radii = [root_r + (top_r - root_r) * i / 4 for i in range(5)]
68 section = [(r, half_gap(r)) for r in radii]
69 section.append((top_r * 1.3, half_gap(top_r)))
70 planes = (("gap_low", H), ("gap_high", F + 0.5))
71 for name, z in planes:
72 scale = (apex - z) / (apex - G)
73 model.plane(f"{name}_plane", on="XY", offset=z, name="Gap section")
74 points = [(r * scale * math.sin(-g), r * scale * math.cos(g)) for r, g in section]
75 points += [(r * scale * math.sin(g), r * scale * math.cos(g)) for r, g in reversed(section)]
76 with model.sketch(f"{name}_sketch", on=f"{name}_plane", name="Gap section") as sk:
77 sk.polyline(f"{name}_outline", points, closed=True)
78 model.loft("gap", ["gap_low_sketch", "gap_high_sketch"], ruled=True, op="cut", name="Tooth gap")
79 model.circular_pattern("gaps", axis="Z", count=teeth, features=["gap"], name="Tooth gaps")
80model.material("steel-generic", color="#b4b8bd")
81result = model.result()
82

Straight miter gear (1:1 bevel gears at 90 degrees) with teeth cut along the pitch cone, on a maker's published outline. The tooth sections use Tredgold's approximation of the involute: close for looks and fits, not a tooth-contact model. detail = simple keeps the teeth filled in. Axis along Z, back on the XY plane. See the README; not affiliated with any maker.

Miter gear

Straight miter gear, 1:1, as an envelope for assemblies. Axis along Z, back on the XY plane.

Geometry

The published outline: the hub, the back cone out to the outside diameter D at the crown (G above the back), a 45° cone up to the total length F, and the bore. detail = "full" cuts the teeth into it, each gap running along the pitch cone to the apex. Tooth sections use Tredgold's approximation: the involute of the equivalent spur gear of z / cos 45° teeth, with ISO 53 proportions (20°, addendum 1.0 m, dedendum 1.25 m). This is close for looks and fits; it isn't a tooth-contact model. detail = "simple" keeps the teeth filled in.

Source

KHK Gears, catalogue 2025, Miter Gears, SM table (carbon steel, straight), PDF p. 26, https://khkgears.us/media/lblpmezm/catalog-2025-miter-gears.pdf. The 45° tip cone is this outline's simplification, checked against the table: (D − B)/2 and (G − H) agree on these sizes.

Number Module Teeth Bore A Hub B Outside D Total F Crown to back G Hub width H
SM1-20 1 20 6 16 21.41 13.94 10.71 8
SM1-25 1 25 6 20 26.41 15.16 11.21 8
SM1-30 1 30 8 24 31.41 17.71 13.71 10
SM1.25-20 1.25 20 8 22 26.77 15.27 11.38 9
SM1.25-25 1.25 25 8 25 33.02 17.88 13.26 9.25
SM1.25-30 1.25 30 10 30 39.27 23.47 18.13 13.5
SM1.5-20 1.5 20 8 26 32.12 21.24 16.06 13
SM1.5-25 1.5 25 10 30 39.62 22.25 16.31 11.5
SM1.5-30 1.5 30 10 36 47.12 28.24 21.56 16
SM2-16 2 16 10 27 34.83 19 15.41 11.5
SM2-20 2 20 12 34 42.83 24.89 18.41 14
SM2-25 2 25 12 40 52.83 24.33 16.41 10
SM2-30 2 30 12 45 62.83 29.42 21.41 12.5
SM2.5-16 2.5 16 12 34 43.53 21 16.77 12
SM2.5-20 2.5 20 14 42 53.54 32.54 24.77 19
SM2.5-25 2.5 25 16 50 66.04 30.41 20.52 12.5
SM2.5-30 2.5 30 16 60 78.54 36.28 26.27 17
SM3-16 3 16 14 42 52.24 23 18.12 13
SM3-20 3 20 16 50 64.24 39.84 30.12 23
SM3-25 3 25 20 60 79.24 37.81 24.62 15
SM3-30 3 30 20 70 94.24 45.47 32.12 20

Maker names identify the source; this part isn't made by or affiliated with KHK. Module 0.8 and teeth 24, 36 aren't in this table and aren't offered.

  1. 1.1.0 Latest Compare with 1.0.0

    Real teeth. detail = simple keeps them filled in.

  2. 1.0.0
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 5 minutes ago v1.0.0
STEVEMIT

steve/gear-rack

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

0 38 sizes 0 1 hour ago v1.0.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