Sign in with STEVE

steve/inch-nut

Hex, jam and square nuts, inch, ASME B18.2.2: machine screw nuts #0 to #10, hex, jam and square nuts 1/4 to 1/2 in.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 78 lines · Python · STEVE runtime · checked
Download
1"""Nut, inch series, Unified threads #0-80 to 1/2-20, ASME B18.2.2: hex and square nuts (machine screw nuts for #0 to
2#10, hex and square nuts for 1/4 to 1/2 in) and hex jam nuts (1/4 to 1/2 in).
3
4Envelope model for assemblies: a hexagonal or square prism (width across flats F, thickness H; corner chamfers not
5modelled) with a plain bore at the basic major diameter D of ASME B1.1 (the thread is not modelled). It sits on the
6XY plane, centred on the origin, axis along +Z. The model is in millimetres (1 in = 25.4 mm).
7"""
8from steve import Model
9
10size = "1/4-20" # Thread (Unified, ASME B1.1)
11style = "hex" # Nut style
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. ASME B1.1-1989 (R2001) basic major diameter D, https://www.engineersedge.com/screw_threads_chart.htm
23DIAMETERS = {
24 "#0": 0.0600, "#1": 0.0730, "#2": 0.0860, "#3": 0.0990, "#4": 0.1120, "#5": 0.1250, "#6": 0.1380,
25 "#8": 0.1640, "#10": 0.1900, "1/4": 0.2500, "5/16": 0.3125, "3/8": 0.3750, "7/16": 0.4375, "1/2": 0.5000,
26}
27# Inches, style: {nominal: (width across flats F, thickness H)}.
28# #0 to #10: ASME B18.2.2 square and hex machine screw nuts (Table 1-1 of the 2010 edition, Table 1.1.1-1 of 2022):
29# F basic and H max (the table gives thickness as min / max only), https://www.fasten.it/Norms/Norm/ASME_B18.2.2_TABLE_1-1
30# (2010), also https://www.engineersedge.com/hardware/hexagon_machine_screw_nuts_14062.htm (F basic as fractions).
31# 1/4 to 1/2: ASME B18.2.2 hex nuts, hex jam nuts and square nuts, F basic and H basic,
32# https://www.engineersedge.com/hex_nut.htm, https://amesweb.info/Fasteners/Nut/Hex-Nut-Sizes-Dimensions-Table.aspx,
33# https://www.aftfasteners.com/hex-jam-nuts-dimensions-technical-information/,
34# https://amesweb.info/Fasteners/Nut/Square-Nuts-Dimensions.aspx (B18.2.2-2010 via Machinery's Handbook 30th ed.).
35NUTS = {
36 "hex": {
37 "#0": (0.15625, 0.050), "#1": (0.15625, 0.050), "#2": (0.1875, 0.066), "#3": (0.1875, 0.066),
38 "#4": (0.25, 0.098), "#5": (0.3125, 0.114), "#6": (0.3125, 0.114), "#8": (0.34375, 0.130),
39 "#10": (0.375, 0.130), "1/4": (0.4375, 0.21875), "5/16": (0.5, 0.265625), "3/8": (0.5625, 0.328125),
40 "7/16": (0.6875, 0.375), "1/2": (0.75, 0.4375),
41 },
42 "jam": {
43 "1/4": (0.4375, 0.15625), "5/16": (0.5, 0.1875), "3/8": (0.5625, 0.21875), "7/16": (0.6875, 0.25),
44 "1/2": (0.75, 0.3125),
45 },
46 "square": {
47 "#0": (0.15625, 0.050), "#1": (0.15625, 0.050), "#2": (0.1875, 0.066), "#3": (0.1875, 0.066),
48 "#4": (0.25, 0.098), "#5": (0.3125, 0.114), "#6": (0.3125, 0.114), "#8": (0.34375, 0.130),
49 "#10": (0.375, 0.130), "1/4": (0.4375, 0.21875), "5/16": (0.5625, 0.265625), "3/8": (0.625, 0.328125),
50 "7/16": (0.75, 0.375), "1/2": (0.8125, 0.4375),
51 },
52}
53# material choice: (STEVE material library id, appearance colour)
54MATERIALS = {
55 "steel": ("steel-generic", "#b8bcc2"), # carbon steel, zinc plated
56 "stainless-18-8": ("stainless-304", "#c9ccd0"),
57 "stainless-316": ("stainless-316", "#c9ccd0"),
58}
59# style: (polygon sides, rotation in degrees): hexagon corners on X, square sides parallel to X and Y
60SHAPES = {"hex": (6, 0), "jam": (6, 0), "square": (4, 45)}
61INCH = 25.4
62
63nominal = THREADS[size]
64F, H = NUTS[style][nominal]
65d = DIAMETERS[nominal] * INCH
66s = F * INCH
67m = H * INCH
68sides, turn = SHAPES[style]
69material_id, colour = MATERIALS[material]
70
71model = Model()
72with model.sketch("nut_sketch", on="XY", name="Nut") as sk:
73 sk.polygon("outline", (0, 0), s / 2, sides, inscribed=False, rotation=turn)
74 sk.circle("bore", (0, 0), d / 2)
75model.extrude("nut", "nut_sketch", distance=m, name="Nut")
76model.material(material_id, color=colour)
77result = model.result()
78

Nut for Unified inch threads: hex nuts and square nuts to ASME B18.2.2 (machine screw nuts for #0 to #10, hex and square nuts for 1/4 to 1/2 in) and hex jam nuts (1/4 to 1/2 in only). Envelope geometry for assemblies: a hexagonal or square prism (width across flats F, thickness H; corner chamfers not modelled) with a plain bore at the ASME B1.1 basic major diameter; the thread itself is not modelled. It sits on the XY plane, centred on the origin (the model is in millimetres). Dimensions: see the README.

Nut, inch (ASME B18.2.2)

Hex nuts, hex jam nuts and square nuts for Unified inch threads (UNC and UNF) #0-80 to 1/2-20. Presets cover the catalogue's hex, jam and square nuts.

Geometry

Envelope for assemblies: a hexagonal or square prism, width across flats F, thickness H (corner chamfers and bearing-face washers are not modelled), with a plain bore at the basic major diameter D; the thread is not modelled. The nut sits on the XY plane, centred on the origin; a hexagon's corners point along X, a square's sides are parallel to X and Y.

Parameters

Parameter Meaning
size Thread, #0-80 to 1/2-20 (UNC and UNF)
style hex, jam (1/4 to 1/2 in only) or square
material steel (carbon steel, zinc plated), stainless-18-8 (304), stainless-316

Sources

The values are the same in the 1987, 2010 and 2022 editions as far as these reproductions show; the citation is ASME B18.2.2-2022 (Tables 1.1.1-1, 1.1.1-3 and 1.1.1-5, numbering from ASME's table of contents https://www.asme.org/getmedia/a5d59a0e-7d26-4b87-aa17-d45e8fcf48e4/B18-2-2_2022_ToC.pdf). Inch values as printed in the tables; the model converts them to millimetres (1 in = 25.4 mm).

Size D Hex F × H Jam F × H Square F × H
#0 0.06 0.15625 × 0.050 – 0.15625 × 0.050
#1 0.073 0.15625 × 0.050 – 0.15625 × 0.050
#2 0.086 0.1875 × 0.066 – 0.1875 × 0.066
#3 0.099 0.1875 × 0.066 – 0.1875 × 0.066
#4 0.112 0.25 × 0.098 – 0.25 × 0.098
#5 0.125 0.3125 × 0.114 – 0.3125 × 0.114
#6 0.138 0.3125 × 0.114 – 0.3125 × 0.114
#8 0.164 0.34375 × 0.130 – 0.34375 × 0.130
#10 0.19 0.375 × 0.130 – 0.375 × 0.130
1/4 0.25 0.4375 × 0.21875 0.4375 × 0.15625 0.4375 × 0.21875
5/16 0.3125 0.5 × 0.265625 0.5 × 0.1875 0.5625 × 0.265625
3/8 0.375 0.5625 × 0.328125 0.5625 × 0.21875 0.625 × 0.328125
7/16 0.4375 0.6875 × 0.375 0.6875 × 0.25 0.75 × 0.375
1/2 0.5 0.75 × 0.4375 0.75 × 0.3125 0.8125 × 0.4375

Corrected in this audit: the #0 to #10 thicknesses were "basic" fractions no edition of the table gives (3/64, 1/16, 3/32, 7/64, 1/8); they are now the table's H max (0.050, 0.066, 0.098, 0.114, 0.130), and the #0 to #10 presets cite ASME B18.2.2 instead of B18.6.3.

Not covered (no sourced table): nylon-insert and all-metal lock nuts, flange nuts, acorn nuts.

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

  1. 1.0.0 Latest
More #fastener
STEVEMIT

steve/inch-specialty-nut

Inch lock, flange and acorn nuts: nylon-insert and all-metal (ASME B18.16.6), hex flange (ASME B18.2.2), acorn (SAE J483).

0 51 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/metric-nut

Metric nuts: hex ISO 4032, thin ISO 4035, nylon-insert DIN 985, all-metal DIN 980, flange DIN 6923, cap DIN 1587, square DIN 557.

0 41 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/hex-nut

Hex nut, ISO 4032, M2 to M12.

7 9 variants 0 2 days ago v1.1.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