Sign in with STEVE

steve/inch-button-head-screw

Button head socket cap screw, inch, ASME B18.3, #0 to 1/2 in, UNC/UNF, any length, with catalogue sizes as presets.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 78 lines · Python · STEVE runtime · checked
Download
1"""Button head socket cap screw, inch series, ASME B18.3, #0 to 1/2 in, UNC and UNF, any length.
2
3Envelope model for assemblies: domed head of diameter A max and height H max (a spherical cap through the head's rim
4and top), hexagon socket (nominal key size J, depth T = key engagement min, measured from the top of the head) and a
5plain shank at the basic major diameter D of ASME B1.1 (the thread is not modelled). The head's bearing face is on
6the XY plane at the origin, the head above it, the shank along -Z; `length` (inches) is the nominal length L under
7the head. The model is in millimetres (1 in = 25.4 mm).
8"""
9import math
10
11from steve import Model
12
13size = "#10-24" # Thread (Unified, ASME B1.1)
14length = 0.5 # in Nominal length under the head
15material = "steel" # Material
16
17# Thread designation: nominal size
18THREADS = {
19 "#0-80": "#0", "#1-64": "#1", "#1-72": "#1", "#2-56": "#2", "#2-64": "#2", "#3-48": "#3", "#3-56": "#3",
20 "#4-40": "#4", "#4-48": "#4", "#5-40": "#5", "#5-44": "#5", "#6-32": "#6", "#6-40": "#6", "#8-32": "#8",
21 "#8-36": "#8", "#10-24": "#10", "#10-32": "#10", "1/4-20": "1/4", "1/4-28": "1/4", "5/16-18": "5/16",
22 "5/16-24": "5/16", "3/8-16": "3/8", "3/8-24": "3/8", "7/16-14": "7/16", "7/16-20": "7/16", "1/2-13": "1/2",
23 "1/2-20": "1/2",
24}
25# Sources (README): D from NBS Handbook H28 (1969) Table 2.7; the rest ASME B18.3-2012 Table 11
26# (https://www.globalfastener.com/standards/detail_20308.html), same values in B18.3-2003.
27# Inches. ASME B1.1 basic major diameter D; ASME B18.3 Table (button head socket cap screws): head diameter A max,
28# head height H max, hexagon socket size J (nominal key), key engagement T min.
29# nominal: (D, A, H, J, T)
30DIMENSIONS = {
31 "#0": (0.0600, 0.114, 0.032, 0.035, 0.020),
32 "#1": (0.0730, 0.139, 0.039, 0.050, 0.028),
33 "#2": (0.0860, 0.164, 0.046, 0.050, 0.028),
34 "#3": (0.0990, 0.188, 0.052, 0.0625, 0.035),
35 "#4": (0.1120, 0.213, 0.059, 0.0625, 0.035),
36 "#5": (0.1250, 0.238, 0.066, 0.078125, 0.044),
37 "#6": (0.1380, 0.262, 0.073, 0.078125, 0.044),
38 "#8": (0.1640, 0.312, 0.087, 0.09375, 0.052),
39 "#10": (0.1900, 0.361, 0.101, 0.125, 0.070),
40 "1/4": (0.2500, 0.437, 0.132, 0.15625, 0.087),
41 "5/16": (0.3125, 0.547, 0.166, 0.1875, 0.105),
42 "3/8": (0.3750, 0.656, 0.199, 0.21875, 0.122),
43 "1/2": (0.5000, 0.875, 0.265, 0.3125, 0.175),
44}
45# material choice: (STEVE material library id, appearance colour)
46MATERIALS = {
47 "steel": ("steel-generic", "#2b2d30"), # alloy steel, black oxide
48 "stainless-18-8": ("stainless-304", "#c9ccd0"),
49 "stainless-316": ("stainless-316", "#c9ccd0"),
50}
51INCH = 25.4
52
53D, A, H, J, T = DIMENSIONS[THREADS[size]]
54d = D * INCH
55dk = A * INCH
56k = H * INCH
57s = J * INCH
58t = T * INCH
59shank = length * INCH
60dome_r = ((dk / 2) ** 2 + k * k) / (2 * k) # sphere through the rim (dk/2, 0) and the top (0, k)
61rim_angle = math.degrees(math.atan2(dome_r - k, dk / 2))
62material_id, colour = MATERIALS[material]
63
64model = Model()
65with model.sketch("profile", on="XZ", name="Profile") as sk:
66 sk.line("tip", (0, -shank), (d / 2, -shank))
67 sk.line("shank_side", (d / 2, -shank), (d / 2, 0))
68 sk.line("bearing_face", (d / 2, 0), (dk / 2, 0))
69 sk.arc("dome", (0, k - dome_r), dome_r, rim_angle, 90)
70 sk.line("axis_line", (0, k), (0, -shank))
71model.revolve("body", "profile", axis="Z", name="Screw")
72model.plane("head_top", on="XY", offset=k, name="Head top")
73with model.sketch("socket_sketch", on="head_top", name="Hexagon socket") as sk:
74 sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False)
75model.extrude("socket", "socket_sketch", distance=-t, op="cut", name="Socket")
76model.material(material_id, color=colour)
77result = model.result()
78

ASME B18.3 button head socket cap screw, Unified inch threads #0-80 to 1/2-20. Envelope geometry for assemblies: domed head (A max, H max), hexagon socket (J, T min) and a plain shank at the ASME B1.1 basic major 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, in inches (the model itself is in millimetres). Dimensions from ASME B18.3 button head table (see the README).

Button head socket cap screw, inch (ASME B18.3)

Button head socket cap screw, Unified inch threads (UNC and UNF) #0-80 to 1/2-20, at any length. Presets cover the catalogue sizes.

Geometry

Envelope for assemblies:

  • domed head of diameter A max and height H max, drawn as a spherical cap through the head's rim and top;
  • hexagon socket, nominal key size J, depth T (key engagement, min) measured from the top of the head;
  • plain shank at the basic major diameter D, length L (length, under the head); 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, #0-80 to 1/2-20 (UNC and UNF; no 7/16, see Sources)
length Nominal length L under the head, inches
material steel (alloy steel, black oxide), stainless-18-8 (304), stainless-316

Sources

The values are the same in the 2003 and 2012 editions; the recipe cites ASME B18.3-2012. The 2012 edition adds a 7/16 size that the 2003 edition and the maker catalogues above don't have; it is not offered here. Inch values as in the standard; the model converts them to millimetres (1 in = 25.4 mm).

Size D A H J T
#0 0.06 0.114 0.032 0.035 0.02
#1 0.073 0.139 0.039 0.05 0.028
#2 0.086 0.164 0.046 0.05 0.028
#3 0.099 0.188 0.052 0.0625 0.035
#4 0.112 0.213 0.059 0.0625 0.035
#5 0.125 0.238 0.066 0.078125 0.044
#6 0.138 0.262 0.073 0.078125 0.044
#8 0.164 0.312 0.087 0.09375 0.052
#10 0.19 0.361 0.101 0.125 0.07
1/4 0.25 0.437 0.132 0.15625 0.087
5/16 0.3125 0.547 0.166 0.1875 0.105
3/8 0.375 0.656 0.199 0.21875 0.122
1/2 0.5 0.875 0.265 0.3125 0.175

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

  1. 1.0.0 Latest
More #fastener
STEVEMIT

steve/inch-socket-head-cap-screw

Socket head cap screw, inch, ASME B18.3, #0 to 1/2 in, UNC/UNF, any length, with catalogue sizes as presets.

0 112 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/inch-flat-head-screw

Flat head (countersunk) socket cap screw, inch, ASME B18.3, #0 to 1/2 in, UNC/UNF, any length, with catalogue sizes as presets.

0 112 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/inch-set-screw

Socket set screw, inch, ASME B18.3, #0 to 1/2 in, UNC/UNF, with catalogue sizes as presets.

0 73 sizes 0 1 day ago v1.0.0
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