Sign in with STEVE

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.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 73 lines · Python · STEVE runtime · checked
Download
1"""Socket head cap screw, inch series, ASME B18.3 (1960 series), #0 to 1/2 in, UNC and UNF, any length.
2
3Envelope model for assemblies: cylindrical head (head diameter A max, head height H max), hexagon socket (nominal key
4size J, depth T = key engagement min) and a plain shank at the basic major diameter D of ASME B1.1 (the thread is not
5modelled). The head's bearing face is on the XY plane at the origin, the head above it, the shank along -Z; `length`
6(inches) is the nominal length L under the head. The model is in millimetres (1 in = 25.4 mm).
7"""
8from steve import Model
9
10size = "#4-40" # Thread (Unified, ASME B1.1)
11length = 0.5 # in Nominal length under the head
12material = "steel" # Material
13
14# Thread designation: nominal size
15THREADS = {
16 "#0-80": "#0", "#1-64": "#1", "#1-72": "#1", "#2-56": "#2", "#2-64": "#2", "#3-48": "#3", "#3-56": "#3",
17 "#4-40": "#4", "#4-48": "#4", "#5-40": "#5", "#5-44": "#5", "#6-32": "#6", "#6-40": "#6", "#8-32": "#8",
18 "#8-36": "#8", "#10-24": "#10", "#10-32": "#10", "1/4-20": "1/4", "1/4-28": "1/4", "5/16-18": "5/16",
19 "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",
20 "1/2-20": "1/2",
21}
22# Sources (README): D from NBS Handbook H28 (1969) Table 2.7; the rest ASME B18.3-2012 Table 1
23# (https://www.globalfastener.com/standards/detail_20304.html), same values in B18.3-2003.
24# Inches. ASME B1.1 basic major diameter D; ASME B18.3 Table 1 (socket head cap screws, 1960 series): head diameter
25# A max, head height H max, hexagon socket size J (nominal key), key engagement T min.
26# nominal: (D, A, H, J, T)
27DIMENSIONS = {
28 "#0": (0.0600, 0.096, 0.060, 0.050, 0.025),
29 "#1": (0.0730, 0.118, 0.073, 0.0625, 0.031),
30 "#2": (0.0860, 0.140, 0.086, 0.078125, 0.038),
31 "#3": (0.0990, 0.161, 0.099, 0.078125, 0.044),
32 "#4": (0.1120, 0.183, 0.112, 0.09375, 0.051),
33 "#5": (0.1250, 0.205, 0.125, 0.09375, 0.057),
34 "#6": (0.1380, 0.226, 0.138, 0.109375, 0.064),
35 "#8": (0.1640, 0.270, 0.164, 0.140625, 0.077),
36 "#10": (0.1900, 0.312, 0.190, 0.15625, 0.090),
37 "1/4": (0.2500, 0.375, 0.250, 0.1875, 0.120),
38 "5/16": (0.3125, 0.469, 0.312, 0.25, 0.151),
39 "3/8": (0.3750, 0.562, 0.375, 0.3125, 0.182),
40 "7/16": (0.4375, 0.656, 0.438, 0.375, 0.213),
41 "1/2": (0.5000, 0.750, 0.500, 0.375, 0.245),
42}
43# material choice: (STEVE material library id, appearance colour)
44MATERIALS = {
45 "steel": ("steel-generic", "#2b2d30"), # alloy steel, black oxide
46 "stainless-18-8": ("stainless-304", "#c9ccd0"),
47 "stainless-316": ("stainless-316", "#c9ccd0"),
48}
49INCH = 25.4
50
51D, A, H, J, T = DIMENSIONS[THREADS[size]]
52d = D * INCH
53dk = A * INCH
54k = H * INCH
55s = J * INCH
56t = T * INCH
57shank = length * INCH
58material_id, colour = MATERIALS[material]
59
60model = Model()
61with model.sketch("head_sketch", on="XY", name="Head") as sk:
62 sk.circle("head_circle", (0, 0), dk / 2)
63model.extrude("head", "head_sketch", distance=k, name="Head")
64with model.sketch("shank_sketch", on="XY", name="Shank") as sk:
65 sk.circle("shank_circle", (0, 0), d / 2)
66model.extrude("shank", "shank_sketch", distance=-shank, name="Shank")
67model.plane("head_top", on="XY", offset=k, name="Head top")
68with model.sketch("socket_sketch", on="head_top", name="Hexagon socket") as sk:
69 sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False)
70model.extrude("socket", "socket_sketch", distance=-t, op="cut", name="Socket")
71model.material(material_id, color=colour)
72result = model.result()
73

ASME B18.3 hexagon socket head cap screw (1960 series), Unified inch threads #0-80 to 1/2-20. Envelope geometry for assemblies: 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 Table 1 (see the README).

Socket head cap screw, inch (ASME B18.3)

Hexagon socket head cap screw, 1960 series, Unified inch threads (UNC and UNF) #0-80 to 1/2-20, at any length. Presets cover the common catalogue sizes (#4-40 × 1/2, 1/4-20 × 1, ...).

Geometry

Envelope for assemblies:

  • cylindrical head, diameter A max, height H max;
  • hexagon socket, nominal key size J, depth T (key engagement, min), flat bottom;
  • plain shank at the basic major 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, #0-80 to 1/2-20 (UNC and UNF)
length Nominal length L under the head, inches
material steel (alloy steel, black oxide), stainless-18-8 (304), stainless-316

Sources

A max, H max, J and T are the same in the 2003 and 2012 editions (they differ only in A min), so the values match both; the recipe cites ASME B18.3-2012. 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.096 0.06 0.05 0.025
#1 0.073 0.118 0.073 0.0625 0.031
#2 0.086 0.14 0.086 0.078125 0.038
#3 0.099 0.161 0.099 0.078125 0.044
#4 0.112 0.183 0.112 0.09375 0.051
#5 0.125 0.205 0.125 0.09375 0.057
#6 0.138 0.226 0.138 0.109375 0.064
#8 0.164 0.27 0.164 0.140625 0.077
#10 0.19 0.312 0.19 0.15625 0.09
1/4 0.25 0.375 0.25 0.1875 0.12
5/16 0.3125 0.469 0.312 0.25 0.151
3/8 0.375 0.562 0.375 0.3125 0.182
7/16 0.4375 0.656 0.438 0.375 0.213
1/2 0.5 0.75 0.5 0.375 0.245

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-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-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-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.

0 112 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