Sign in with STEVE

steve/button-head-screw

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

v2.0.0 Latest STEVE MIT 10
Isometric
part.py 57 lines · Python · STEVE runtime · checked
Download
1"""Hexagon socket button head screw, ISO 7380-1, M3 to M16, any length.
2
3Envelope model for assemblies: domed head (a spherical cap of diameter dk max and height k max), hexagon socket (key
4size s, depth t min) and a plain shank at the nominal thread diameter d (the thread is not modelled).
5The head's bearing face is on the XY plane at the origin, the head above it, the shank along -Z; `length` is the
6nominal length l, measured from under the head.
7"""
8import math
9
10from steve import Model
11
12size = "M5" # Thread size
13length = 10 # mm Nominal length (under the head)
14material = "steel" # Material
15
16# ISO 7380-1:2011, Table 1 (official preview p. 3:
17# https://cdn.standards.iteh.ai/samples/53671/84df01c5fcce4a91896ac3b0c55ca128/ISO-7380-1-2011.pdf); the same values in
18# ISO 7380-1:2022, Table 1 (https://cdn.standards.iteh.ai/samples/78699/a175805085534f98983d6c8aa583a5b0/ISO-7380-1-2022.pdf). size: (thread d, head diameter dk max, head height k max, hexagon socket s, socket depth t min)
19DIMENSIONS = {
20 "M3": (3.0, 5.7, 1.65, 2.0, 1.04),
21 "M4": (4.0, 7.6, 2.2, 2.5, 1.3),
22 "M5": (5.0, 9.5, 2.75, 3.0, 1.56),
23 "M6": (6.0, 10.5, 3.3, 4.0, 2.08),
24 "M8": (8.0, 14.0, 4.4, 5.0, 2.6),
25 "M10": (10.0, 17.5, 5.5, 6.0, 3.12),
26 "M12": (12.0, 21.0, 6.6, 8.0, 4.16),
27 "M16": (16.0, 28.0, 8.8, 10.0, 5.2),
28}
29# material choice: (STEVE material library id, appearance colour)
30MATERIALS = {
31 "steel": ("steel-generic", "#2b2d30"), # property class 10.9 / 12.9, black oxide finish
32 "stainless-a2": ("stainless-304", "#c9ccd0"), # ISO 3506-1 A2-70
33 "stainless-a4": ("stainless-316", "#c9ccd0"), # ISO 3506-1 A4-70 / A4-80
34}
35
36d, dk, k, s, t = DIMENSIONS[size]
37material_id, colour = MATERIALS[material]
38r = dk / 2
39dome_r = (r * r + k * k) / (2 * k) # radius of the spherical cap through the head's rim and top
40start = math.degrees(math.atan2(dome_r - k, r))
41
42model = Model()
43with model.sketch("head_profile", on="XZ", name="Head profile") as sk:
44 sk.line("base", (0, 0), (r, 0))
45 sk.arc("dome", (0, k - dome_r), dome_r, start, 90)
46 sk.line("axis", (0, k), (0, 0))
47model.revolve("head", "head_profile", axis="Z", name="Head")
48with model.sketch("shank_sketch", on="XY", name="Shank") as sk:
49 sk.circle("shank_circle", (0, 0), d / 2)
50model.extrude("shank", "shank_sketch", distance=-length, name="Shank")
51model.plane("head_top", on="XY", offset=k, name="Head top")
52with model.sketch("socket_sketch", on="head_top", name="Hexagon socket") as sk:
53 sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False)
54model.extrude("socket", "socket_sketch", distance=-t, op="cut", name="Socket")
55model.material(material_id, color=colour)
56result = model.result()
57

ISO 7380-1 hexagon socket button head screw. Envelope geometry for assemblies: domed head (dk max, k max), hexagon socket (s, t min) 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 7380-1:2011 Table 1 (see the README).

Button head screw (ISO 7380-1)

Hexagon socket button head screw, metric coarse thread, M3 to M16, at any length. Presets cover the common catalogue sizes (M3 × 6, M5 × 10, ...).

Geometry

Envelope for assemblies and clearance checks:

  • domed head: a spherical cap of diameter dk max and height k max (the standard's head radius is a reference value; the cap through the rim and the top is used);
  • hexagon socket, key size s (nominal), depth t min, flat bottom;
  • 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, M3 to M16
length Nominal length l under the head, mm
material steel (property class 10.9 / 12.9, black oxide), stainless-a2, stainless-a4 (ISO 3506-1)

Source

ISO 7380-1:2011, Button head screws — Part 1: Hexagon socket button head screws, Table 1, p. 3: d, dk max, k max, s (nominal), t min, read from the official preview (https://cdn.standards.iteh.ai/samples/53671/84df01c5fcce4a91896ac3b0c55ca128/ISO-7380-1-2011.pdf) and fasten.it's DIN EN ISO 7380-1:2011-11 (https://fasten.it/en/Norms/Norm/DIN EN ISO 7380-1). The current edition, ISO 7380-1:2022, Table 1, p. 4 (https://cdn.standards.iteh.ai/samples/78699/a175805085534f98983d6c8aa583a5b0/ISO-7380-1-2022.pdf), has the same dk max, k max, s and t min (it adds t max and changes dw and e, which this model doesn't use).

Size dk k s t
M3 5.7 1.65 2.0 1.04
M4 7.6 2.2 2.5 1.3
M5 9.5 2.75 3.0 1.56
M6 10.5 3.3 4.0 2.08
M8 14.0 4.4 5.0 2.6
M10 17.5 5.5 6.0 3.12
M12 21.0 6.6 8.0 4.16
M16 28.0 8.8 10.0 5.2

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/hex-head-screw

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

18 85 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
STEVEMIT

steve/captive-panel-screw

Captive panel screw envelope, M3 to M5, any length: shank and round knob (simplified).

0 18 sizes 0 1 day ago v1.0.0