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.
Countersunk socket screw, ISO 10642 / DIN 7991, M3 to M12, any length.
| 1 | """ISO 10642 (DIN 7991) countersunk socket screw. Envelope: 90 degree head and plain shank in one revolved |
| 2 | profile, hex socket. The head's top face is on the XY plane at the origin; `length` is the overall length. |
| 3 | |
| 4 | Material: property class 10.9 alloy steel, quenched and tempered (34CrNiMo6 from the material library), black oxide.""" |
| 5 | from steve import Model |
| 6 | |
| 7 | size = "M4" # Thread size |
| 8 | length = 12 # mm Overall length (head included) |
| 9 | |
| 10 | # size: (head diameter dk, head height k, hex key s) |
| 11 | HEADS = { |
| 12 | 'M3': (6.72, 1.86, 2.0), |
| 13 | 'M4': (8.96, 2.48, 2.5), |
| 14 | 'M5': (11.2, 3.1, 3.0), |
| 15 | 'M6': (13.44, 3.72, 4.0), |
| 16 | 'M8': (17.92, 4.96, 5.0), |
| 17 | 'M10': (22.4, 6.2, 6.0), |
| 18 | 'M12': (26.88, 7.44, 8.0), |
| 19 | } |
| 20 | NOMINAL = { |
| 21 | 'M3': 3.0, |
| 22 | 'M4': 4.0, |
| 23 | 'M5': 5.0, |
| 24 | 'M6': 6.0, |
| 25 | 'M8': 8.0, |
| 26 | 'M10': 10.0, |
| 27 | 'M12': 12.0, |
| 28 | } |
| 29 | dk, k, s = HEADS[size] |
| 30 | d = NOMINAL[size] |
| 31 | cone = (dk - d) / 2 # 90 degree countersink: as deep as it is wide |
| 32 | total = max(length, cone + 0.5) |
| 33 | |
| 34 | model = Model() |
| 35 | with model.sketch("profile", on="XZ", name="Profile") as sk: |
| 36 | sk.polyline("outline", [(0, 0), (dk / 2, 0), (d / 2, -cone), (d / 2, -total), (0, -total)]) |
| 37 | model.revolve("body", "profile", axis="Z") |
| 38 | with model.sketch("socket_sketch", on="XY", name="Hex socket") as sk: |
| 39 | sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False) |
| 40 | model.extrude("socket", "socket_sketch", distance=-0.8 * k, op="cut") |
| 41 | model.material("steel-34crnimo6") # class 10.9 alloy steel |
| 42 | model.appearance(color="#2e3034", metalness=0.75, roughness=0.38) # black oxide finish |
| 43 | result = model.result() |
| 44 |
| 1 | name = "steve/countersunk-screw" |
| 2 | version = "1.1.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Countersunk socket screw, ISO 10642 / DIN 7991, M3 to M12, any length." |
| 6 | description = "ISO 10642 (DIN 7991) countersunk socket screw. Envelope: 90 degree head and plain shank in one revolved\nprofile, hex socket. The head's top face is on the XY plane at the origin; `length` is the overall length.\n\nMaterial: property class 10.9 alloy steel, quenched and tempered (34CrNiMo6 from the material library), black oxide.\n\nDimensions from STEVE's standard-part tables (nominal values of the standard). Envelope geometry: no modelled thread." |
| 7 | tags = ["fastener", "screw", "iso-10642", "din-7991", "metric"] |
| 8 | changes = "Materials and finishes: each part is made of its standard's engineering material, with its usual finish." |
| 9 | |
| 10 | [parameters.size] |
| 11 | type = "choice" |
| 12 | default = "M4" |
| 13 | choices = ["M3", "M4", "M5", "M6", "M8", "M10", "M12"] |
| 14 | label = "Thread size" |
| 15 | |
| 16 | [parameters.length] |
| 17 | type = "number" |
| 18 | default = 12 |
| 19 | min = 3 |
| 20 | max = 120 |
| 21 | step = 1 |
| 22 | unit = "mm" |
| 23 | label = "Length" |
| 24 |
ISO 10642 (DIN 7991) countersunk socket screw. Envelope: 90 degree head and plain shank in one revolved profile, hex socket. The head's top face is on the XY plane at the origin; `length` is the overall length. Material: property class 10.9 alloy steel, quenched and tempered (34CrNiMo6 from the material library), black oxide. 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.
Flat head (countersunk) socket cap screw, inch, ASME B18.3, #0 to 1/2 in, UNC/UNF, 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.
Pan head screw with cross recess, ISO 7045, M2 to M8, any length.