steve/low-head-socket-cap-screw
Low head socket cap screw, DIN 7984, M3 to M12, any length, with catalogue sizes as presets.
Socket head cap screw, ISO 4762 / DIN 912, M2 to M12, any length.
| 1 | """ISO 4762 (DIN 912) socket head cap screw. Envelope: head, hex socket and plain shank (no modelled thread). |
| 2 | The head sits on the XY plane at the origin; the shank points down -Z. `length` is measured under the head.""" |
| 3 | from steve import Model |
| 4 | |
| 5 | size = "M3" # Thread size |
| 6 | length = 10 # mm Length under the head |
| 7 | |
| 8 | # size: (head diameter dk, head height k, hex key s) |
| 9 | HEADS = { |
| 10 | 'M2': (3.8, 2.0, 1.5), |
| 11 | 'M2.5': (4.5, 2.5, 2.0), |
| 12 | 'M3': (5.5, 3.0, 2.5), |
| 13 | 'M4': (7.0, 4.0, 3.0), |
| 14 | 'M5': (8.5, 5.0, 4.0), |
| 15 | 'M6': (10.0, 6.0, 5.0), |
| 16 | 'M8': (13.0, 8.0, 6.0), |
| 17 | 'M10': (16.0, 10.0, 8.0), |
| 18 | 'M12': (18.0, 12.0, 10.0), |
| 19 | } |
| 20 | NOMINAL = { |
| 21 | 'M2': 2.0, |
| 22 | 'M2.5': 2.5, |
| 23 | 'M3': 3.0, |
| 24 | 'M4': 4.0, |
| 25 | 'M5': 5.0, |
| 26 | 'M6': 6.0, |
| 27 | 'M8': 8.0, |
| 28 | 'M10': 10.0, |
| 29 | 'M12': 12.0, |
| 30 | } |
| 31 | dk, k, s = HEADS[size] |
| 32 | d = NOMINAL[size] |
| 33 | |
| 34 | model = Model() |
| 35 | with model.sketch("head_sketch", on="XY", name="Head") as sk: |
| 36 | sk.circle("head", (0, 0), dk / 2) |
| 37 | model.extrude("head", "head_sketch", distance=k) |
| 38 | with model.sketch("shank_sketch", on="XY", name="Shank") as sk: |
| 39 | sk.circle("shank", (0, 0), d / 2) |
| 40 | model.extrude("shank", "shank_sketch", distance=-length) |
| 41 | model.plane("head_top", on="XY", offset=k, name="Head top") |
| 42 | with model.sketch("socket_sketch", on="head_top", name="Hex socket") as sk: |
| 43 | sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False) |
| 44 | model.extrude("socket", "socket_sketch", distance=-0.55 * k, op="cut") |
| 45 | result = model.result() |
| 46 |
| 1 | name = "steve/socket-head-cap-screw" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Socket head cap screw, ISO 4762 / DIN 912, M2 to M12, any length." |
| 6 | description = "ISO 4762 (DIN 912) socket head cap screw. Envelope: head, hex socket and plain shank (no modelled thread).\nThe head sits on the XY plane at the origin; the shank points down -Z. `length` is measured under the head.\n\nDimensions from STEVE's standard-part tables (nominal values of the standard). Envelope geometry: no modelled thread." |
| 7 | tags = ["fastener", "screw", "iso-4762", "din-912", "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 | |
| 15 | [parameters.length] |
| 16 | type = "number" |
| 17 | default = 10 |
| 18 | min = 3 |
| 19 | max = 120 |
| 20 | step = 1 |
| 21 | unit = "mm" |
| 22 | label = "Length" |
| 23 |
ISO 4762 (DIN 912) socket head cap screw. Envelope: head, hex socket and plain shank (no modelled thread). The head sits on the XY plane at the origin; the shank points down -Z. `length` is measured under the head. 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.
Low head socket cap screw, DIN 7984, M3 to M12, any length, with catalogue sizes as presets.
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.
Hexagon socket countersunk head screw, ISO 10642 / DIN 7991, M3 to M12, any length, with catalogue sizes as presets.