steve/hex-head-screw
Hexagon head screw, fully threaded, ISO 4017 / DIN 933, M1.6 to M36, any length, with catalogue sizes as presets.
Captive panel screw envelope, M3 to M5, any length: shank and round knob (simplified).
| 1 | """Captive panel screw envelope, M3 to M5, any length, as step.parts' published models draw it: a shank (drawn at the |
| 2 | thread's nominal diameter) and a round knob, two bodies. |
| 3 | |
| 4 | The shank (diameter d, length `length`) runs along +Z from z = 0; the knob (diameter 2d, height d) is centred on the |
| 5 | shank's top end, so it overlaps the shank by d / 2 (two bodies, as in the models: the knob is a separate part of a |
| 6 | captive screw). No thread, retainer, spring or knurl. |
| 7 | """ |
| 8 | from steve import Model |
| 9 | |
| 10 | thread = "M3" # Thread |
| 11 | length = 20 # mm Shank length |
| 12 | material = "unspecified" # Material |
| 13 | |
| 14 | # mm, measured on step.parts' models captive_panel_screw_m<d>_l<length> (the cylinders of their two solids): shank |
| 15 | # diameter = the thread's nominal d; knob diameter 2d and height d, centred on the shank's top end (every model) |
| 16 | THREADS = {"M3": 3.0, "M4": 4.0, "M5": 5.0} |
| 17 | KNOB_DIAMETER = 2.0 # x d |
| 18 | KNOB_HEIGHT = 1.0 # x d |
| 19 | MATERIALS = {"unspecified": (None, None), "steel": ("steel-generic", "#9da2a8"), |
| 20 | "stainless-304": ("stainless-304", "#c9ccd0")} |
| 21 | |
| 22 | d = THREADS[thread] |
| 23 | material_id, colour = MATERIALS[material] |
| 24 | |
| 25 | model = Model() |
| 26 | model.cylinder("shank", d / 2, length, name="Shank") |
| 27 | model.cylinder("knob", KNOB_DIAMETER * d / 2, KNOB_HEIGHT * d, at=(0, 0, length - KNOB_HEIGHT * d / 2), op="new", |
| 28 | name="Knob") |
| 29 | if material_id: |
| 30 | model.material(material_id, color=colour) |
| 31 | result = model.result() |
| 32 |
| 1 | name = "steve/captive-panel-screw" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Captive panel screw envelope, M3 to M5, any length: shank and round knob (simplified)." |
| 6 | description = """A captive panel screw envelope for assemblies: a shank at the thread's nominal diameter and a round \ |
| 7 | knob (2d across, d high) centred on its top end, two bodies, M3 to M5 at any length. Measured from step.parts' \ |
| 8 | published models (MIT); no maker or standard is behind them (PennEngineering PF11/PF12 come in other lengths). |
| 9 | |
| 10 | Shank along +Z from the origin. Dimensions and attribution: see the README.""" |
| 11 | tags = ["captive-screw", "panel-screw", "screw", "fastener", "panel", "metric"] |
| 12 | |
| 13 | [parameters.thread] |
| 14 | type = "choice" |
| 15 | default = "M3" |
| 16 | choices = ["M3", "M4", "M5"] |
| 17 | label = "Thread" |
| 18 | |
| 19 | [parameters.length] |
| 20 | type = "number" |
| 21 | default = 20 |
| 22 | min = 4 |
| 23 | max = 100 |
| 24 | unit = "mm" |
| 25 | label = "Shank length" |
| 26 | |
| 27 | [parameters.material] |
| 28 | type = "choice" |
| 29 | default = "unspecified" |
| 30 | choices = ["unspecified", "steel", "stainless-304"] |
| 31 | label = "Material" |
| 32 | |
| 33 | [[presets]] |
| 34 | id = "M3x10" |
| 35 | title = "Captive panel screw M3 × 10 (envelope)" |
| 36 | params = { thread = "M3", length = 10 } |
| 37 | aliases = ["captive screw M3x10", "panel screw M3 x 10", "captive panel fastener M3 10 mm", "captive panel screw", "thread=M3; captive screw length=10 mm; simplified head/retainer envelope"] |
| 38 | standard = "step.parts captive panel screw model" |
| 39 | |
| 40 | [[presets]] |
| 41 | id = "M3x12" |
| 42 | title = "Captive panel screw M3 × 12 (envelope)" |
| 43 | params = { thread = "M3", length = 12 } |
| 44 | aliases = ["captive screw M3x12", "panel screw M3 x 12", "captive panel fastener M3 12 mm", "captive panel screw", "thread=M3; captive screw length=12 mm; simplified head/retainer envelope"] |
| 45 | standard = "step.parts captive panel screw model" |
| 46 | |
| 47 | [[presets]] |
| 48 | id = "M3x16" |
| 49 | title = "Captive panel screw M3 × 16 (envelope)" |
| 50 | params = { thread = "M3", length = 16 } |
| 51 | aliases = ["captive screw M3x16", "panel screw M3 x 16", "captive panel fastener M3 16 mm", "captive panel screw", "thread=M3; captive screw length=16 mm; simplified head/retainer envelope"] |
| 52 | standard = "step.parts captive panel screw model" |
| 53 | |
| 54 | [[presets]] |
| 55 | id = "M3x20" |
| 56 | title = "Captive panel screw M3 × 20 (envelope)" |
| 57 | params = { thread = "M3", length = 20 } |
| 58 | aliases = ["captive screw M3x20", "panel screw M3 x 20", "captive panel fastener M3 20 mm", "captive panel screw", "thread=M3; captive screw length=20 mm; simplified head/retainer envelope"] |
| 59 | standard = "step.parts captive panel screw model" |
| 60 | |
| 61 | [[presets]] |
| 62 | id = "M3x25" |
| 63 | title = "Captive panel screw M3 × 25 (envelope)" |
| 64 | params = { thread = "M3", length = 25 } |
| 65 | aliases = ["captive screw M3x25", "panel screw M3 x 25", "captive panel fastener M3 25 mm", "captive panel screw", "thread=M3; captive screw length=25 mm; simplified head/retainer envelope"] |
| 66 | standard = "step.parts captive panel screw model" |
| 67 | |
| 68 | [[presets]] |
| 69 | id = "M3x30" |
| 70 | title = "Captive panel screw M3 × 30 (envelope)" |
| 71 | params = { thread = "M3", length = 30 } |
| 72 | aliases = ["captive screw M3x30", "panel screw M3 x 30", "captive panel fastener M3 30 mm", "captive panel screw", "thread=M3; captive screw length=30 mm; simplified head/retainer envelope"] |
| 73 | standard = "step.parts captive panel screw model" |
| 74 | |
| 75 | [[presets]] |
| 76 | id = "M4x10" |
| 77 | title = "Captive panel screw M4 × 10 (envelope)" |
| 78 | params = { thread = "M4", length = 10 } |
| 79 | aliases = ["captive screw M4x10", "panel screw M4 x 10", "captive panel fastener M4 10 mm", "captive panel screw", "thread=M4; captive screw length=10 mm; simplified head/retainer envelope"] |
| 80 | standard = "step.parts captive panel screw model" |
| 81 | |
| 82 | [[presets]] |
| 83 | id = "M4x12" |
| 84 | title = "Captive panel screw M4 × 12 (envelope)" |
| 85 | params = { thread = "M4", length = 12 } |
| 86 | aliases = ["captive screw M4x12", "panel screw M4 x 12", "captive panel fastener M4 12 mm", "captive panel screw", "thread=M4; captive screw length=12 mm; simplified head/retainer envelope"] |
| 87 | standard = "step.parts captive panel screw model" |
| 88 | |
| 89 | [[presets]] |
| 90 | id = "M4x16" |
| 91 | title = "Captive panel screw M4 × 16 (envelope)" |
| 92 | params = { thread = "M4", length = 16 } |
| 93 | aliases = ["captive screw M4x16", "panel screw M4 x 16", "captive panel fastener M4 16 mm", "captive panel screw", "thread=M4; captive screw length=16 mm; simplified head/retainer envelope"] |
| 94 | standard = "step.parts captive panel screw model" |
| 95 | |
| 96 | [[presets]] |
| 97 | id = "M4x20" |
| 98 | title = "Captive panel screw M4 × 20 (envelope)" |
| 99 | params = { thread = "M4", length = 20 } |
| 100 | aliases = ["captive screw M4x20", "panel screw M4 x 20", "captive panel fastener M4 20 mm", "captive panel screw", "thread=M4; captive screw length=20 mm; simplified head/retainer envelope"] |
| 101 | standard = "step.parts captive panel screw model" |
| 102 | |
| 103 | [[presets]] |
| 104 | id = "M4x25" |
| 105 | title = "Captive panel screw M4 × 25 (envelope)" |
| 106 | params = { thread = "M4", length = 25 } |
| 107 | aliases = ["captive screw M4x25", "panel screw M4 x 25", "captive panel fastener M4 25 mm", "captive panel screw", "thread=M4; captive screw length=25 mm; simplified head/retainer envelope"] |
| 108 | standard = "step.parts captive panel screw model" |
| 109 | |
| 110 | [[presets]] |
| 111 | id = "M4x30" |
| 112 | title = "Captive panel screw M4 × 30 (envelope)" |
| 113 | params = { thread = "M4", length = 30 } |
| 114 | aliases = ["captive screw M4x30", "panel screw M4 x 30", "captive panel fastener M4 30 mm", "captive panel screw", "thread=M4; captive screw length=30 mm; simplified head/retainer envelope"] |
| 115 | standard = "step.parts captive panel screw model" |
| 116 | |
| 117 | [[presets]] |
| 118 | id = "M5x10" |
| 119 | title = "Captive panel screw M5 × 10 (envelope)" |
| 120 | params = { thread = "M5", length = 10 } |
| 121 | aliases = ["captive screw M5x10", "panel screw M5 x 10", "captive panel fastener M5 10 mm", "captive panel screw", "thread=M5; captive screw length=10 mm; simplified head/retainer envelope"] |
| 122 | standard = "step.parts captive panel screw model" |
| 123 | |
| 124 | [[presets]] |
| 125 | id = "M5x12" |
| 126 | title = "Captive panel screw M5 × 12 (envelope)" |
| 127 | params = { thread = "M5", length = 12 } |
| 128 | aliases = ["captive screw M5x12", "panel screw M5 x 12", "captive panel fastener M5 12 mm", "captive panel screw", "thread=M5; captive screw length=12 mm; simplified head/retainer envelope"] |
| 129 | standard = "step.parts captive panel screw model" |
| 130 | |
| 131 | [[presets]] |
| 132 | id = "M5x16" |
| 133 | title = "Captive panel screw M5 × 16 (envelope)" |
| 134 | params = { thread = "M5", length = 16 } |
| 135 | aliases = ["captive screw M5x16", "panel screw M5 x 16", "captive panel fastener M5 16 mm", "captive panel screw", "thread=M5; captive screw length=16 mm; simplified head/retainer envelope"] |
| 136 | standard = "step.parts captive panel screw model" |
| 137 | |
| 138 | [[presets]] |
| 139 | id = "M5x20" |
| 140 | title = "Captive panel screw M5 × 20 (envelope)" |
| 141 | params = { thread = "M5", length = 20 } |
| 142 | aliases = ["captive screw M5x20", "panel screw M5 x 20", "captive panel fastener M5 20 mm", "captive panel screw", "thread=M5; captive screw length=20 mm; simplified head/retainer envelope"] |
| 143 | standard = "step.parts captive panel screw model" |
| 144 | |
| 145 | [[presets]] |
| 146 | id = "M5x25" |
| 147 | title = "Captive panel screw M5 × 25 (envelope)" |
| 148 | params = { thread = "M5", length = 25 } |
| 149 | aliases = ["captive screw M5x25", "panel screw M5 x 25", "captive panel fastener M5 25 mm", "captive panel screw", "thread=M5; captive screw length=25 mm; simplified head/retainer envelope"] |
| 150 | standard = "step.parts captive panel screw model" |
| 151 | |
| 152 | [[presets]] |
| 153 | id = "M5x30" |
| 154 | title = "Captive panel screw M5 × 30 (envelope)" |
| 155 | params = { thread = "M5", length = 30 } |
| 156 | aliases = ["captive screw M5x30", "panel screw M5 x 30", "captive panel fastener M5 30 mm", "captive panel screw", "thread=M5; captive screw length=30 mm; simplified head/retainer envelope"] |
| 157 | standard = "step.parts captive panel screw model" |
| 158 |
A captive panel screw envelope for assemblies: a shank and a round knob, M3 to M5, any length.
The shank (diameter d, the thread's nominal diameter, no thread) runs along +Z from z = 0, length long; the knob
(diameter 2d, height d) is centred on the shank's top end, overlapping it by d / 2. Shank and knob are two bodies, as
in the models. Overall height: length + d / 2.
| Thread | Shank Ø | Knob Ø × height |
|---|---|---|
| M3 | 3 | 6 × 3 |
| M4 | 4 | 8 × 4 |
| M5 | 5 | 10 × 5 |
| Parameter | Meaning |
|---|---|
thread |
M3, M4, M5 |
length |
shank length, mm |
material |
unspecified (no material assigned), steel, stainless-304 |
These generic screws name no maker (PennEngineering's PF11/PF12 come in other lengths) and no standard covers them. The geometry was measured from the published reference models below (the cylinders of each model's two solids), and every preset is checked against its own model: bounding box within 0.05 mm and volume within 2 %.
captive_panel_screw_m<d>_l<length> for M3, M4, M5 × 10 to 30 mm (https://www.step.parts,
repository https://github.com/earthtojake/step.parts, commit c6113328, catalog/step/): step.parts' own models,
original project material under the repository's MIT licence (© 2026 earthtojake). They name no material, so
the presets have material = "unspecified".Simplifications (the models'): plain cylinders: no thread, retainer, spring, ferrule or knurl.
Preset list: from the step.parts catalogue (MIT), see library/NOTICE.md.
| 1 | # Captive panel screw (envelope) |
| 2 | |
| 3 | A captive panel screw envelope for assemblies: a shank and a round knob, M3 to M5, any length. |
| 4 | |
| 5 | ## Geometry |
| 6 | |
| 7 | The shank (diameter d, the thread's nominal diameter, no thread) runs along +Z from z = 0, `length` long; the knob |
| 8 | (diameter 2d, height d) is centred on the shank's top end, overlapping it by d / 2. Shank and knob are two bodies, as |
| 9 | in the models. Overall height: length + d / 2. |
| 10 | |
| 11 | | Thread | Shank Ø | Knob Ø × height | |
| 12 | |---|---|---| |
| 13 | | M3 | 3 | 6 × 3 | |
| 14 | | M4 | 4 | 8 × 4 | |
| 15 | | M5 | 5 | 10 × 5 | |
| 16 | |
| 17 | ## Parameters |
| 18 | |
| 19 | | Parameter | Meaning | |
| 20 | |---|---| |
| 21 | | `thread` | `M3`, `M4`, `M5` | |
| 22 | | `length` | shank length, mm | |
| 23 | | `material` | `unspecified` (no material assigned), `steel`, `stainless-304` | |
| 24 | |
| 25 | ## Sources |
| 26 | |
| 27 | These generic screws name no maker (PennEngineering's PF11/PF12 come in other lengths) and no standard covers them. |
| 28 | **The geometry was measured from the published reference models** below (the cylinders of each model's two solids), |
| 29 | and every preset is checked against its own model: bounding box within 0.05 mm and volume within 2 %. |
| 30 | |
| 31 | - **step.parts**, `captive_panel_screw_m<d>_l<length>` for M3, M4, M5 × 10 to 30 mm (https://www.step.parts, |
| 32 | repository https://github.com/earthtojake/step.parts, commit c6113328, `catalog/step/`): step.parts' own models, |
| 33 | original project material under the repository's **MIT** licence (© 2026 earthtojake). They name no material, so |
| 34 | the presets have `material = "unspecified"`. |
| 35 | |
| 36 | Simplifications (the models'): plain cylinders: no thread, retainer, spring, ferrule or knurl. |
| 37 | |
| 38 | Preset list: from the step.parts catalogue (MIT), see `library/NOTICE.md`. |
| 39 |
A captive panel screw envelope for assemblies: a shank at the thread's nominal diameter and a round knob (2d across, d high) centred on its top end, two bodies, M3 to M5 at any length. Measured from step.parts' published models (MIT); no maker or standard is behind them (PennEngineering PF11/PF12 come in other lengths). Shank along +Z from the origin. Dimensions and attribution: see the README.
A captive panel screw envelope for assemblies: a shank and a round knob, M3 to M5, any length.
The shank (diameter d, the thread's nominal diameter, no thread) runs along +Z from z = 0, length long; the knob
(diameter 2d, height d) is centred on the shank's top end, overlapping it by d / 2. Shank and knob are two bodies, as
in the models. Overall height: length + d / 2.
| Thread | Shank Ø | Knob Ø × height |
|---|---|---|
| M3 | 3 | 6 × 3 |
| M4 | 4 | 8 × 4 |
| M5 | 5 | 10 × 5 |
| Parameter | Meaning |
|---|---|
thread |
M3, M4, M5 |
length |
shank length, mm |
material |
unspecified (no material assigned), steel, stainless-304 |
These generic screws name no maker (PennEngineering's PF11/PF12 come in other lengths) and no standard covers them. The geometry was measured from the published reference models below (the cylinders of each model's two solids), and every preset is checked against its own model: bounding box within 0.05 mm and volume within 2 %.
captive_panel_screw_m<d>_l<length> for M3, M4, M5 × 10 to 30 mm (https://www.step.parts,
repository https://github.com/earthtojake/step.parts, commit c6113328, catalog/step/): step.parts' own models,
original project material under the repository's MIT licence (© 2026 earthtojake). They name no material, so
the presets have material = "unspecified".Simplifications (the models'): plain cylinders: no thread, retainer, spring, ferrule or knurl.
Preset list: from the step.parts catalogue (MIT), see library/NOTICE.md.
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.
Pan head screw with cross recess, ISO 7045, M2 to M8, any length.