Compare versions
2 files changed, +8 −3 1.1.0: Materials and finishes: each part is made of its standard's engineering material, with its usual finish.
| @@ -1,5 +1,7 @@ | ||
| 1 | 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.""" | |
| 2 | The head sits on the XY plane at the origin; the shank points down -Z. `length` is measured under the head. | |
| 3 | ||
| 4 | Material: property class 12.9 alloy steel, quenched and tempered (34CrNiMo6 from the material library), black oxide.""" | |
| 3 | 5 | from steve import Model |
| 4 | 6 | |
| 5 | 7 | size = "M3" # Thread size |
| @@ -42,5 +44,7 @@ | ||
| 42 | 44 | with model.sketch("socket_sketch", on="head_top", name="Hex socket") as sk: |
| 43 | 45 | sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False) |
| 44 | 46 | model.extrude("socket", "socket_sketch", distance=-0.55 * k, op="cut") |
| 47 | model.material("steel-34crnimo6") # class 12.9 alloy steel | |
| 48 | model.appearance(color="#2e3034", metalness=0.75, roughness=0.38) # black oxide finish | |
| 45 | 49 | result = model.result() |
| 46 | 50 |
| @@ -1,10 +1,11 @@ | ||
| 1 | 1 | name = "steve/socket-head-cap-screw" |
| 2 | version = "1.0.0" | |
| 2 | version = "1.1.0" | |
| 3 | 3 | runtime = "steve" |
| 4 | 4 | license = "MIT" |
| 5 | 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." | |
| 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\nMaterial: property class 12.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 | 7 | tags = ["fastener", "screw", "iso-4762", "din-912", "metric"] |
| 8 | changes = "Materials and finishes: each part is made of its standard's engineering material, with its usual finish." | |
| 8 | 9 | |
| 9 | 10 | [parameters.size] |
| 10 | 11 | type = "choice" |