Sign in with STEVE

steve/hex-head-screw

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

v2.0.0 Latest STEVE MIT 18
Isometric
part.py 54 lines · Python · STEVE runtime · checked
Download
1"""Hexagon head screw (fully threaded), ISO 4017 (DIN 933), M1.6 to M36, any length.
2
3Envelope model for assemblies: hexagon head (width across flats s, height k, sharp corners) and a plain shank at the
4nominal thread diameter d (the thread is not modelled). The head's bearing face is on the XY plane at the origin,
5the head above it, the shank along -Z; `length` is the nominal length l, measured from under the head. Two flats of
6the head are parallel to the X axis.
7"""
8from steve import Model
9
10size = "M6" # Thread size
11length = 20 # mm Nominal length (under the head)
12material = "steel" # Material
13
14# ISO 4017:2022, Tables 1-3 (official preview pp. 3-5:
15# https://cdn.standards.iteh.ai/samples/72585/1179998ddd594550a909d6e13c416f3e/ISO-4017-2022.pdf); the same values in
16# ISO 4017:2011 Table 1 and ISO 4017:2014 (M1.6-M6 seen). size: (thread d, width across flats s nominal, head height k nominal)
17DIMENSIONS = {
18 "M1.6": (1.6, 3.2, 1.1),
19 "M2": (2.0, 4.0, 1.4),
20 "M2.5": (2.5, 5.0, 1.7),
21 "M3": (3.0, 5.5, 2.0),
22 "M4": (4.0, 7.0, 2.8),
23 "M5": (5.0, 8.0, 3.5),
24 "M6": (6.0, 10.0, 4.0),
25 "M8": (8.0, 13.0, 5.3),
26 "M10": (10.0, 16.0, 6.4),
27 "M12": (12.0, 18.0, 7.5),
28 "M14": (14.0, 21.0, 8.8),
29 "M16": (16.0, 24.0, 10.0),
30 "M20": (20.0, 30.0, 12.5),
31 "M24": (24.0, 36.0, 15.0),
32 "M30": (30.0, 46.0, 18.7),
33 "M36": (36.0, 55.0, 22.5),
34}
35# material choice: (STEVE material library id, appearance colour)
36MATERIALS = {
37 "steel": ("steel-generic", "#b4b8bd"), # property class 8.8, zinc plated
38 "stainless-a2": ("stainless-304", "#c9ccd0"), # ISO 3506-1 A2-70
39 "stainless-a4": ("stainless-316", "#c9ccd0"), # ISO 3506-1 A4-70 / A4-80
40}
41
42d, s, k = DIMENSIONS[size]
43material_id, colour = MATERIALS[material]
44
45model = Model()
46with model.sketch("head_sketch", on="XY", name="Head") as sk:
47 sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False)
48model.extrude("head", "head_sketch", distance=k, name="Head")
49with model.sketch("shank_sketch", on="XY", name="Shank") as sk:
50 sk.circle("shank_circle", (0, 0), d / 2)
51model.extrude("shank", "shank_sketch", distance=-length, name="Shank")
52model.material(material_id, color=colour)
53result = model.result()
54

ISO 4017 (DIN 933) hexagon head screw, thread to the head. Envelope geometry for assemblies: hexagon head (s, k, sharp corners) and a plain shank at the nominal thread diameter; the thread itself is not modelled. The head's bearing face is on the XY plane at the origin and the shank points along -Z; `length` is the nominal length under the head. Dimensions from ISO 4017:2014 Table 1 (see the README).

Hex head screw (ISO 4017 / DIN 933)

Hexagon head screw threaded up to the head, metric coarse thread, M1.6 to M36, at any length. Presets cover the common catalogue sizes (M6 × 20, M8 × 40, ...).

Geometry

Envelope for assemblies and clearance checks:

  • hexagon head, width across flats s (nominal), height k (nominal), sharp corners (across corners s / cos 30°, the largest the head can be); two flats parallel to the X axis;
  • plain shank at the nominal thread diameter d, length l (length); the thread is not modelled.

The head's bearing face is on the XY plane at the origin, the head above it, the shank along -Z.

Parameters

Parameter Meaning
size Thread size, M1.6 to M36
length Nominal length l under the head, mm
material steel (property class 8.8, zinc plated), stainless-a2, stainless-a4 (ISO 3506-1)

Source

ISO 4017:2022, Fasteners — Hexagon head screws — Product grades A and B, Tables 1 to 3, pp. 3-5: d, s (nominal = max), k (nominal), read from the official preview (https://cdn.standards.iteh.ai/samples/72585/1179998ddd594550a909d6e13c416f3e/ISO-4017-2022.pdf; M30 and M36 are product grade B, Table 3). The same values in ISO 4017:2011, Table 1 (https://fpg-co.com/Standards/ISO 4017-2011 Hexagon head screws — Product grades A and B.pdf) and, for M1.6 to M6, the ISO 4017:2014 preview. fasten.it's DIN EN ISO 4017:2014 page gives k 19 and 23 for M30 and M36, which are DIN 933 heights and contradict its own k min (18.28, 22.08); the ISO tables' 18.7 and 22.5 are used. DIN 933 uses the same s for these sizes except M10 (17), M12 (19), M14 (22) and M22; this recipe follows ISO 4017.

Size s k
M1.6 3.2 1.1
M2 4.0 1.4
M2.5 5.0 1.7
M3 5.5 2.0
M4 7.0 2.8
M5 8.0 3.5
M6 10.0 4.0
M8 13.0 5.3
M10 16.0 6.4
M12 18.0 7.5
M14 21.0 8.8
M16 24.0 10.0
M20 30.0 12.5
M24 36.0 15.0
M30 46.0 18.7
M36 55.0 22.5

Preset list: sizes and lengths of the step.parts catalogue (MIT), see library/NOTICE.md.

  1. 2.0.0 Latest Compare with 1.1.0
  2. 1.1.0 Compare with 1.0.0

    Materials and finishes: each part is made of its standard's engineering material, with its usual finish.

  3. 1.0.0
More #fastener
STEVEMIT

steve/inch-hex-head-screw

Hex head screw, inch: ASME B18.2.1 hex cap screws 1/4 to 1/2 in, B18.6.3 hex machine screws #2 to #10, any length.

0 107 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/button-head-screw

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

10 65 sizes 0 1 day ago v2.0.0
STEVEMIT

steve/countersunk-screw

Hexagon socket countersunk head screw, ISO 10642 / DIN 7991, M3 to M12, any length, with catalogue sizes as presets.

0 62 sizes 0 1 day ago v2.0.0
STEVEMIT

steve/pan-head-screw

Pan head screw with cross recess, ISO 7045, M2 to M8, any length.

0 7 variants 0 2 days ago v1.1.0