Sign in with STEVE

steve/clearance-hole

Clearance hole cylinder for metric bolts and screws, M1.6 to M100: ISO 273 fine, medium and coarse, at the low, middle or high end of H12, H13 or H14.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 33 lines · Python · STEVE runtime · checked
Download
1"""Clearance hole for a metric bolt or screw, as a cylinder to cut with: ISO 273 fine, medium and coarse series, at the low, middle or high end of its H tolerance.
2Axis along Z, the top face on the XY plane, the cylinder running down for the depth. Dimensions in the README."""
3from steve import Model
4
5thread = "M3" # Thread
6fit = "normal" # close (ISO 273 fine, H12), normal (medium, H13) or loose (coarse, H14)
7tolerance = "mean" # min, mean or max of the hole's tolerance
8depth = 10 # mm Depth
9
10# thread: (fine, medium, coarse) clearance hole d_h in mm. ISO 273:1979, Section 2, Dimensions, table (official preview p. 1,
11# https://cdn.standards.iteh.ai/samples/4183/1a8db2e6de054d2e9bed7d40be64d6e1/ISO-273-1979.pdf). Tolerance fields given there for information: fine H12,
12# medium H13, coarse H14.
13HOLES = {
14 "M1.6": (1.7, 1.8, 2), "M2": (2.2, 2.4, 2.6), "M2.5": (2.7, 2.9, 3.1), "M3": (3.2, 3.4, 3.6), "M4": (4.3, 4.5, 4.8), "M5": (5.3, 5.5, 5.8),
15 "M6": (6.4, 6.6, 7), "M8": (8.4, 9, 10), "M10": (10.5, 11, 12), "M12": (13, 13.5, 14.5), "M14": (15, 15.5, 16.5), "M16": (17, 17.5, 18.5),
16 "M20": (21, 22, 24), "M24": (25, 26, 28), "M30": (31, 33, 35), "M36": (37, 39, 42), "M42": (43, 45, 48), "M48": (50, 52, 56), "M56": (58, 62, 66),
17 "M64": (66, 70, 74), "M72": (74, 78, 82), "M80": (82, 86, 91), "M90": (93, 96, 101), "M100": (104, 107, 112),
18}
19# size range upper bound in mm: (IT12, IT13, IT14) in micrometres. ISO 286-1 standard tolerance grades, as reproduced in ELESA+GANTER Technical Data 10.8,
20# DIN ISO 286 ISO-Fundamental tolerances (2018), https://www.elesa-ganter.in/siteassets/technical/DIN_ISO_286_ISO_Fundamental_Tolerances_EN.pdf
21GRADES = {3: (100, 140, 250), 6: (120, 180, 300), 10: (150, 220, 360), 18: (180, 270, 430), 30: (210, 330, 520), 50: (250, 390, 620), 80: (300, 460, 740), 120: (350, 540, 870)}
22
23column = {"close": 0, "normal": 1, "loose": 2}[fit]
24nominal = HOLES[thread][column]
25grade = next(GRADES[bound] for bound in sorted(GRADES) if nominal <= bound)[column] / 1000
26diameter = nominal + {"min": 0, "mean": grade / 2, "max": grade}[tolerance] # an H hole: lower deviation 0, upper deviation the grade
27
28model = Model()
29with model.sketch("hole_sketch", on="XY", name="Hole") as sk:
30 sk.circle("hole_circle", (0, 0), diameter / 2)
31model.extrude("hole", "hole_sketch", distance=-depth, name="Hole")
32result = model.result()
33

A cylinder to cut a clearance hole with: ISO 273's hole diameter for the thread and series, plus the chosen point of its H tolerance (ISO 286). See the README.

Clearance hole

A cylinder to cut a clearance hole for a metric bolt or screw with. Its axis is along Z, its top face on the XY plane, and it runs down for the depth.

Source

An H hole has a lower deviation of 0 and an upper deviation of the grade. So min is d_h, max is d_h plus the grade, and mean is halfway between.

fit maps to ISO 273's series: close is fine, normal is medium, loose is coarse. The depth is yours to set; it isn't part of either standard.

  1. 1.0.0 Latest
STEVEMIT

steve/hex-head-screw

Hexagon head screw, fully threaded, ISO 4017 / DIN 933, M1.6 to M36, any length, with catalogue sizes as presets.

20 86 sizes 0 4 hours ago v2.4.2
STEVEMIT

steve/button-head-screw

Hexagon socket button head screw, ISO 7380-1, M3 to M16, any length, with catalogue sizes as presets.

12 66 sizes 0 4 hours ago v2.2.2
STEVEMIT

steve/hex-nut

Hex nut, ISO 4032, M2 to M12.

9 9 variants 0 4 days ago v1.1.0
STEVEMIT

steve/split-lock-washer

Split lock washer (spring washer), DIN 127 form B, M2 to M100.

5 21 sizes 0 4 days ago v1.0.0