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.
| 1 | """ISO 4032 hex nut. Envelope: hex prism with a plain bore at the thread's nominal diameter. |
| 2 | It sits on the XY plane, centred on the origin.""" |
| 3 | from steve import Model |
| 4 | |
| 5 | size = "M3" # Thread size |
| 6 | |
| 7 | # size: (across flats s, height m) |
| 8 | NUTS = { |
| 9 | 'M2': (4.0, 1.6), |
| 10 | 'M2.5': (5.0, 2.0), |
| 11 | 'M3': (5.5, 2.4), |
| 12 | 'M4': (7.0, 3.2), |
| 13 | 'M5': (8.0, 4.7), |
| 14 | 'M6': (10.0, 5.2), |
| 15 | 'M8': (13.0, 6.8), |
| 16 | 'M10': (16.0, 8.4), |
| 17 | 'M12': (18.0, 10.8), |
| 18 | } |
| 19 | NOMINAL = { |
| 20 | 'M2': 2.0, |
| 21 | 'M2.5': 2.5, |
| 22 | 'M3': 3.0, |
| 23 | 'M4': 4.0, |
| 24 | 'M5': 5.0, |
| 25 | 'M6': 6.0, |
| 26 | 'M8': 8.0, |
| 27 | 'M10': 10.0, |
| 28 | 'M12': 12.0, |
| 29 | } |
| 30 | s, m = NUTS[size] |
| 31 | d = NOMINAL[size] |
| 32 | |
| 33 | model = Model() |
| 34 | with model.sketch("nut_sketch", on="XY", name="Nut") as sk: |
| 35 | sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False) |
| 36 | sk.circle("bore", (0, 0), d / 2) |
| 37 | model.extrude("nut", "nut_sketch", distance=m) |
| 38 | result = model.result() |
| 39 |
| 1 | name = "steve/hex-nut" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Hex nut, ISO 4032, M2 to M12." |
| 6 | description = "ISO 4032 hex nut. Envelope: hex prism with a plain bore at the thread's nominal diameter.\nIt sits on the XY plane, centred on the origin.\n\nDimensions from STEVE's standard-part tables (nominal values of the standard). Envelope geometry: no modelled thread." |
| 7 | tags = ["fastener", "nut", "iso-4032", "metric"] |
| 8 | |
| 9 | [parameters.size] |
| 10 | type = "choice" |
| 11 | default = "M3" |
| 12 | choices = ["M2", "M2.5", "M3", "M4", "M5", "M6", "M8", "M10", "M12"] |
| 13 | label = "Thread size" |
| 14 |
ISO 4032 hex nut. Envelope: hex prism with a plain bore at the thread's nominal diameter. It sits on the XY plane, centred on the origin. Dimensions from STEVE's standard-part tables (nominal values of the standard). Envelope geometry: no modelled thread.
Materials and finishes: each part is made of its standard's engineering material, with its usual finish.
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.
Hexagon head screw, fully threaded, ISO 4017 / DIN 933, M1.6 to M36, any length, with catalogue sizes as presets.
Hexagon socket button head screw, ISO 7380-1, M3 to M16, any length, with catalogue sizes as presets.
Split lock washer (spring washer), DIN 127 form B, M2 to M100.