Sign in with STEVE

steve/inch-set-screw

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

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 90 lines · Python · STEVE runtime · checked
Download
1"""Socket set screw, inch series, ASME B18.3, #0 to 1/2 in, UNC and UNF, any length.
2
3Envelope model for assemblies: a plain cylinder at the basic major diameter D of ASME B1.1 (the thread and the point
4shape, e.g. a cup point, are not modelled) with a hexagon socket of nominal key size J in its top end, as deep as the standard's minimum key engagement for cup and flat
5point screws of that length (T_H min from L0 up; the short-length table below L0). The top face is on the XY plane at the origin and the
6screw points along -Z; `length` (inches) is the overall length. The model is in millimetres (1 in = 25.4 mm).
7"""
8from steve import Model
9
10size = "#10-32" # Thread (Unified, ASME B1.1)
11length = 0.25 # in Overall length
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# Inches. D: basic major diameter (ASME B1.1; NBS Handbook H28 (1969) Table 2.7,
23# https://nvlpubs.nist.gov/nistpubs/Legacy/hb/nbshandbook28-1969p1.pdf; Holo-Krome Technical Manual 2015 Table 13).
24# J, T_H min, L0: ASME B18.3 hexagon socket set screws, cup point (ASME B18.3-2012 Table 14,
25# https://www.globalfastener.com/standards/detail_20314.html; same J and T_H in B18.3-2003 Table 5A,
26# https://www.fasten.it/en/norms/norm/asme_b18.3_table_5a, and Holo-Krome Table 13, p. 16-17 [PDF 24-25],
27# https://holo-krome.com/uploads/7/2/7/5/72754089/hk_consolidated_tech_manual_full_2015.pdf).
28# T_H applies to nominal lengths L0 and longer (note 3).
29# nominal: (D, J nominal key, T_H min key engagement, L0 shortest length for T_H, cup and flat point)
30DIMENSIONS = {
31 "#0": (0.0600, 0.028, 0.050, 0.125),
32 "#1": (0.0730, 0.035, 0.060, 0.125),
33 "#2": (0.0860, 0.035, 0.060, 0.125),
34 "#3": (0.0990, 0.050, 0.070, 0.1875),
35 "#4": (0.1120, 0.050, 0.070, 0.1875),
36 "#5": (0.1250, 0.0625, 0.080, 0.1875),
37 "#6": (0.1380, 0.0625, 0.080, 0.1875),
38 "#8": (0.1640, 0.078125, 0.090, 0.1875),
39 "#10": (0.1900, 0.09375, 0.100, 0.1875),
40 "1/4": (0.2500, 0.125, 0.125, 0.25),
41 "5/16": (0.3125, 0.15625, 0.156, 0.3125),
42 "3/8": (0.3750, 0.1875, 0.188, 0.375),
43 "7/16": (0.4375, 0.21875, 0.219, 0.4375),
44 "1/2": (0.5000, 0.25, 0.250, 0.5),
45}
46# Shorter lengths, cup and flat points: Holo-Krome Technical Manual 2015, Table 14 "Hexagon key engagements for short
47# length set screws" (p. 18 [PDF 26]). nominal: {nominal length L: T min key engagement}. The table prints lengths as
48# two-place decimals (Table 13 note 1): 0.06 = 1/16, 0.09 = 3/32, 0.13 = 1/8, 0.16 = 5/32, 0.19 = 3/16, 0.25,
49# 0.31 = 5/16, 0.38 = 3/8, 0.44 = 7/16. Other lengths shorter than L0 have no sourced key engagement.
50SHORT = {
51 "#0": {0.0625: 0.030, 0.09375: 0.040}, "#1": {0.0625: 0.030, 0.09375: 0.040},
52 "#2": {0.0625: 0.030, 0.09375: 0.040}, "#3": {0.09375: 0.040, 0.125: 0.055},
53 "#4": {0.09375: 0.045, 0.125: 0.060}, "#5": {0.09375: 0.040, 0.125: 0.060},
54 "#6": {0.09375: 0.040, 0.125: 0.060, 0.15625: 0.070}, "#8": {0.125: 0.060, 0.15625: 0.070},
55 "#10": {0.125: 0.060}, "1/4": {0.1875: 0.090}, "5/16": {0.25: 0.125}, "3/8": {0.25: 0.110, 0.3125: 0.140},
56 "7/16": {0.375: 0.160}, "1/2": {0.375: 0.175, 0.4375: 0.215},
57}
58# material choice: (STEVE material library id, appearance colour)
59MATERIALS = {
60 "steel": ("steel-generic", "#2b2d30"), # alloy steel, black oxide
61 "stainless-18-8": ("stainless-304", "#c9ccd0"),
62 "stainless-316": ("stainless-316", "#c9ccd0"),
63}
64INCH = 25.4
65
66nominal_size = THREADS[size]
67D, J, T_H, L0 = DIMENSIONS[nominal_size]
68if length >= L0 - 1e-9:
69 T = T_H
70elif any(abs(length - L) < 1e-6 for L in SHORT[nominal_size]):
71 T = next(v for L, v in SHORT[nominal_size].items() if abs(length - L) < 1e-6)
72else:
73 raise ValueError(f"no sourced key engagement for a {size} set screw {length} in long: lengths from {L0} in, "
74 f"or {', '.join(str(L) for L in SHORT[nominal_size])} in")
75d = D * INCH
76s = J * INCH
77overall = length * INCH
78depth = T * INCH
79material_id, colour = MATERIALS[material]
80
81model = Model()
82with model.sketch("body_sketch", on="XY", name="Body") as sk:
83 sk.circle("body_circle", (0, 0), d / 2)
84model.extrude("body", "body_sketch", distance=-overall, name="Body")
85with model.sketch("socket_sketch", on="XY", name="Hexagon socket") as sk:
86 sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False)
87model.extrude("socket", "socket_sketch", distance=-depth, op="cut", name="Socket")
88model.material(material_id, color=colour)
89result = model.result()
90

ASME B18.3 hexagon socket set screw, Unified inch threads #0-80 to 1/2-20. Envelope geometry for assemblies: a plain cylinder at the ASME B1.1 basic major diameter with the hexagon socket (key size J) in its top end, as deep as the standard's minimum key engagement for cup and flat point screws of that length; the thread and the point shape (cup, flat, cone) are not modelled. The top face is on the XY plane at the origin and the screw points along -Z; `length` is the overall length in inches (the model itself is in millimetres). Dimensions from ASME B1.1 and ASME B18.3 (see the README).

Socket set screw, inch (ASME B18.3)

Hexagon socket set screw (grub screw), Unified inch threads (UNC and UNF) #0-80 to 1/2-20. Presets cover the catalogue sizes (cup point screws in the catalogue).

Geometry

Envelope for assemblies: a plain cylinder at the basic major diameter D, overall length L (length), with a hexagon socket of nominal key size J in its top end, flat-bottomed at the standard's minimum key engagement for cup and flat point screws: T_H min for lengths L0 and longer, the short-length table's value below L0 (see Sources). The thread and the point shape (cup, flat, cone, dog) are not modelled.

The top face is on the XY plane at the origin and the screw points along -Z.

Parameters

Parameter Meaning
size Thread, #0-80 to 1/2-20 (UNC and UNF)
length Overall length L, inches: L0 or longer, or one of the short-length table's lengths
material steel (alloy steel, black oxide), stainless-18-8 (304), stainless-316

Sources

The values are the same in ASME B18.3-2003 and B18.3-2012 for every column used here. Inch values as in the tables; the model converts them to millimetres (1 in = 25.4 mm).

Size D J T_H min L0 Short lengths L: T min
#0 0.06 0.028 0.050 1/8 1/16: 0.030, 3/32: 0.040
#1 0.073 0.035 0.060 1/8 1/16: 0.030, 3/32: 0.040
#2 0.086 0.035 0.060 1/8 1/16: 0.030, 3/32: 0.040
#3 0.099 0.05 0.070 3/16 3/32: 0.040, 1/8: 0.055
#4 0.112 0.05 0.070 3/16 3/32: 0.045, 1/8: 0.060
#5 0.125 0.0625 0.080 3/16 3/32: 0.040, 1/8: 0.060
#6 0.138 0.0625 0.080 3/16 3/32: 0.040, 1/8: 0.060, 5/32: 0.070
#8 0.164 0.078125 0.090 3/16 1/8: 0.060, 5/32: 0.070
#10 0.19 0.09375 0.100 3/16 1/8: 0.060
1/4 0.25 0.125 0.125 1/4 3/16: 0.090
5/16 0.3125 0.15625 0.156 5/16 1/4: 0.125
3/8 0.375 0.1875 0.188 3/8 1/4: 0.110, 5/16: 0.140
7/16 0.4375 0.21875 0.219 7/16 3/8: 0.160
1/2 0.5 0.25 0.250 1/2 3/8: 0.175, 7/16: 0.215

Corrected in this audit: the socket was drawn min(L / 2, J) deep, a depth no source gives; it is now the standard's minimum key engagement. The catalogue's 1/2 × 1/4 in screws (shorter than L0 = 1/2 in and not in the short-length table) have no preset.

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