steve/clearance-hole
Clearance hole cylinder for metric bolts and screws, M1.6 to M100: ISO 273 fine, medium and coarse, at the low, middle or high end of H12, H13 or H14.
Countersink for metric countersunk head screws, M1.6 to M10: ISO 15065's 90 degree countersink over its ISO 273 medium clearance hole, as a solid to cut with.
| 1 | """Countersink for a metric countersunk head screw (head to ISO 7721), as a solid to cut with: ISO 15065's 90 degree countersink over its |
| 2 | clearance hole. Axis along Z, the top face on the XY plane: the cone from the countersink diameter Dc at the top down to the hole d_h, then the |
| 3 | hole running down to the depth. Dimensions in the README.""" |
| 4 | from steve import Model |
| 5 | |
| 6 | thread = "M3" # Thread (ISO 15065 nominal size) |
| 7 | depth = 10 # mm Depth of the hole, from the top face |
| 8 | |
| 9 | # thread: (hole d_h min. (nom.), d_h max., countersink Dc min. (nom.), Dc max., depth t approx.) in mm. ISO 15065:2005, Clause 3, Table 1, |
| 10 | # "Dimensions of countersink" (official preview p. 2, https://cdn.standards.iteh.ai/samples/37365/57c8c6dac6864ac5a6f7bfa6fdd06111/ISO-15065-2005.pdf). |
| 11 | # d_h is ISO 273's medium series clearance hole, tolerance H13 (the table's footnote a). |
| 12 | COUNTERSINKS = { |
| 13 | "M1.6": (1.80, 1.94, 3.6, 3.7, 0.95), |
| 14 | "M2": (2.40, 2.54, 4.4, 4.5, 1.05), |
| 15 | "M2.5": (2.90, 3.04, 5.5, 5.6, 1.35), |
| 16 | "M3": (3.40, 3.58, 6.3, 6.5, 1.55), |
| 17 | "M3.5": (3.90, 4.08, 8.2, 8.4, 2.25), |
| 18 | "M4": (4.50, 4.68, 9.4, 9.6, 2.55), |
| 19 | "M5": (5.50, 5.68, 10.40, 10.65, 2.58), |
| 20 | "M6": (6.60, 6.82, 12.60, 12.85, 3.13), |
| 21 | "M8": (9.00, 9.22, 17.30, 17.55, 4.28), |
| 22 | "M10": (11.00, 11.27, 20.0, 20.3, 4.65), |
| 23 | } |
| 24 | # The countersink angle, ISO 15065:2005 Figure 1: 90 degrees (+-1). |
| 25 | ANGLE = 90 |
| 26 | |
| 27 | if thread not in COUNTERSINKS: |
| 28 | raise ValueError(f"no ISO 15065 countersink for {thread!r}: {', '.join(COUNTERSINKS)}") |
| 29 | d_h, _d_h_max, d_c, _d_c_max, _t = COUNTERSINKS[thread] |
| 30 | cone = (d_c - d_h) / 2 # the 90 degree cone's height from Dc to d_h |
| 31 | if depth <= cone: |
| 32 | raise ValueError(f"the depth must be more than the countersink's {cone:g} mm") |
| 33 | |
| 34 | model = Model() |
| 35 | with model.sketch("profile_sketch", on="XZ", name="Profile") as sk: |
| 36 | sk.polyline("profile", [(0, 0), (d_c / 2, 0), (d_h / 2, -cone), (d_h / 2, -depth), (0, -depth)], closed=True) |
| 37 | model.revolve("countersink", "profile_sketch", axis="Z", name="Countersink") |
| 38 | result = model.result() |
| 39 |
| 1 | name = "steve/countersink-hole" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Countersink for metric countersunk head screws, M1.6 to M10: ISO 15065's 90 degree countersink over its ISO 273 medium clearance hole, as a solid to cut with." |
| 6 | description = """A solid to cut a countersunk screw's hole with: the 90 degree cone from ISO 15065's countersink diameter Dc down to its clearance hole d_h (ISO 273 medium series), then the hole to the depth you set. Nominal (minimum) Dc and d_h. For screws whose head follows ISO 7721 (ISO 10642, ISO 2009, ISO 7046 and others). See the README.""" |
| 7 | tags = ["countersink", "hole", "iso-15065", "fastener", "cad-helper", "metric"] |
| 8 | |
| 9 | [parameters.thread] |
| 10 | type = "choice" |
| 11 | default = "M3" |
| 12 | choices = ["M1.6", "M2", "M2.5", "M3", "M3.5", "M4", "M5", "M6", "M8", "M10"] |
| 13 | label = "Thread" |
| 14 | |
| 15 | [parameters.depth] |
| 16 | type = "number" |
| 17 | default = 10 |
| 18 | min = 0.5 |
| 19 | max = 1000 |
| 20 | unit = "mm" |
| 21 | label = "Depth" |
| 22 | description = "From the top face to the bottom of the hole; more than the countersink's cone." |
| 23 | |
| 24 | [[presets]] |
| 25 | id = "M2" |
| 26 | title = "M2 countersink, ISO 15065 (Dc 4.4, hole 2.4)" |
| 27 | params = { thread = "M2" } |
| 28 | aliases = ["M2 countersink", "ISO 15065 M2", "Countersink ISO 15065 - 2", "M2 countersunk screw hole", "M2 countersink cutter", "M2 csk hole"] |
| 29 | standard = "ISO 15065" |
| 30 | |
| 31 | [[presets]] |
| 32 | id = "M2.5" |
| 33 | title = "M2.5 countersink, ISO 15065 (Dc 5.5, hole 2.9)" |
| 34 | params = { thread = "M2.5" } |
| 35 | aliases = ["M2.5 countersink", "ISO 15065 M2.5", "Countersink ISO 15065 - 2,5", "M2.5 countersunk screw hole", "M2.5 countersink cutter", "M2.5 csk hole"] |
| 36 | standard = "ISO 15065" |
| 37 | |
| 38 | [[presets]] |
| 39 | id = "M3" |
| 40 | title = "M3 countersink, ISO 15065 (Dc 6.3, hole 3.4)" |
| 41 | params = { thread = "M3" } |
| 42 | aliases = ["M3 countersink", "ISO 15065 M3", "Countersink ISO 15065 - 3", "M3 countersunk screw hole", "M3 countersink cutter", "M3 csk hole"] |
| 43 | standard = "ISO 15065" |
| 44 | |
| 45 | [[presets]] |
| 46 | id = "M4" |
| 47 | title = "M4 countersink, ISO 15065 (Dc 9.4, hole 4.5)" |
| 48 | params = { thread = "M4" } |
| 49 | aliases = ["M4 countersink", "ISO 15065 M4", "Countersink ISO 15065 - 4", "M4 countersunk screw hole", "M4 countersink cutter", "M4 csk hole"] |
| 50 | standard = "ISO 15065" |
| 51 | |
| 52 | [[presets]] |
| 53 | id = "M5" |
| 54 | title = "M5 countersink, ISO 15065 (Dc 10.4, hole 5.5)" |
| 55 | params = { thread = "M5" } |
| 56 | aliases = ["M5 countersink", "ISO 15065 M5", "Countersink ISO 15065 - 5", "M5 countersunk screw hole", "M5 countersink cutter", "M5 csk hole"] |
| 57 | standard = "ISO 15065" |
| 58 | |
| 59 | [[presets]] |
| 60 | id = "M6" |
| 61 | title = "M6 countersink, ISO 15065 (Dc 12.6, hole 6.6)" |
| 62 | params = { thread = "M6" } |
| 63 | aliases = ["M6 countersink", "ISO 15065 M6", "Countersink ISO 15065 - 6", "M6 countersunk screw hole", "M6 countersink cutter", "M6 csk hole"] |
| 64 | standard = "ISO 15065" |
| 65 | |
| 66 | [[presets]] |
| 67 | id = "M8" |
| 68 | title = "M8 countersink, ISO 15065 (Dc 17.3, hole 9)" |
| 69 | params = { thread = "M8" } |
| 70 | aliases = ["M8 countersink", "ISO 15065 M8", "Countersink ISO 15065 - 8", "M8 countersunk screw hole", "M8 countersink cutter", "M8 csk hole"] |
| 71 | standard = "ISO 15065" |
| 72 | |
| 73 | [[presets]] |
| 74 | id = "M1.6" |
| 75 | title = "M1.6 countersink, ISO 15065 (Dc 3.6, hole 1.8)" |
| 76 | params = { thread = "M1.6" } |
| 77 | aliases = ["M1.6 countersink", "ISO 15065 M1.6", "Countersink ISO 15065 - 1,6", "M1.6 countersunk screw hole", "M1.6 countersink cutter", "M1.6 csk hole"] |
| 78 | standard = "ISO 15065" |
| 79 | |
| 80 | [[presets]] |
| 81 | id = "M3.5" |
| 82 | title = "M3.5 countersink, ISO 15065 (Dc 8.2, hole 3.9)" |
| 83 | params = { thread = "M3.5" } |
| 84 | aliases = ["M3.5 countersink", "ISO 15065 M3.5", "Countersink ISO 15065 - 3,5", "M3.5 countersunk screw hole", "M3.5 countersink cutter", "M3.5 csk hole"] |
| 85 | standard = "ISO 15065" |
| 86 | |
| 87 | [[presets]] |
| 88 | id = "M10" |
| 89 | title = "M10 countersink, ISO 15065 (Dc 20, hole 11)" |
| 90 | params = { thread = "M10" } |
| 91 | aliases = ["M10 countersink", "ISO 15065 M10", "Countersink ISO 15065 - 10", "M10 countersunk screw hole", "M10 countersink cutter", "M10 csk hole"] |
| 92 | standard = "ISO 15065" |
| 93 |
A solid to cut a countersink and its clearance hole with, for a metric countersunk head screw whose head follows ISO 7721: for example ISO 10642 hexagon socket, ISO 2009 slotted and ISO 7046 cross recessed countersunk screws. Its axis is along Z, with its top face on the XY plane. The 90 degree cone runs from the countersink diameter Dc at the top down to the hole diameter d_h. The hole then runs down to the depth, measured from the top face.
| Thread | d_h min. (nom.) | d_h max. | Dc min. (nom.) | Dc max. | t ≈ |
|---|---|---|---|---|---|
| M1.6 | 1.80 | 1.94 | 3.6 | 3.7 | 0.95 |
| M2 | 2.40 | 2.54 | 4.4 | 4.5 | 1.05 |
| M2.5 | 2.90 | 3.04 | 5.5 | 5.6 | 1.35 |
| M3 | 3.40 | 3.58 | 6.3 | 6.5 | 1.55 |
| M3.5 | 3.90 | 4.08 | 8.2 | 8.4 | 2.25 |
| M4 | 4.50 | 4.68 | 9.4 | 9.6 | 2.55 |
| M5 | 5.50 | 5.68 | 10.40 | 10.65 | 2.58 |
| M6 | 6.60 | 6.82 | 12.60 | 12.85 | 3.13 |
| M8 | 9.00 | 9.22 | 17.30 | 17.55 | 4.28 |
| M10 | 11.00 | 11.27 | 20.0 | 20.3 | 4.65 |
The model uses the nominal values, d_h and Dc min. (nom.), and the 90 degree angle. The cone's height is then (Dc − d_h) / 2. The table's t, the countersink depth, is given as approximate (≈) and isn't used; it is the depth at Dc max.
ISO 15065:2005, Countersinks for countersunk head screws with head configuration in accordance with ISO 7721, first edition. Clause 3, Figure 1 (the 90° ±1° angle) and Table 1, "Dimensions of countersink", are on page 2 of the official preview: https://cdn.standards.iteh.ai/samples/37365/57c8c6dac6864ac5a6f7bfa6fdd06111/ISO-15065-2005.pdf. Table 1's footnote a says d_h is ISO 273's medium series clearance hole, tolerance H13. ISO 15065 also lists tapping screw sizes ST2,2 to ST9,5 and a nominal size 5,5 for ST5,5 only; this recipe offers the metric threads.
The depth of the hole is yours to set; it isn't part of the standard.
The old catalogue's countersink_clearance_M<n>_cutter entries (M2, M2.5, M3, M4, M5, M6, M8) name only the thread and have no model to measure. Each maps to this recipe's preset for that thread.
| 1 | # Countersink hole |
| 2 | |
| 3 | A solid to cut a countersink and its clearance hole with, for a metric countersunk head screw whose head follows ISO 7721: for example ISO 10642 hexagon socket, ISO 2009 slotted and ISO 7046 cross recessed countersunk screws. Its axis is along Z, with its top face on the XY plane. The 90 degree cone runs from the countersink diameter Dc at the top down to the hole diameter d_h. The hole then runs down to the depth, measured from the top face. |
| 4 | |
| 5 | | Thread | d_h min. (nom.) | d_h max. | Dc min. (nom.) | Dc max. | t ≈ | |
| 6 | |---|---|---|---|---|---| |
| 7 | | M1.6 | 1.80 | 1.94 | 3.6 | 3.7 | 0.95 | |
| 8 | | M2 | 2.40 | 2.54 | 4.4 | 4.5 | 1.05 | |
| 9 | | M2.5 | 2.90 | 3.04 | 5.5 | 5.6 | 1.35 | |
| 10 | | M3 | 3.40 | 3.58 | 6.3 | 6.5 | 1.55 | |
| 11 | | M3.5 | 3.90 | 4.08 | 8.2 | 8.4 | 2.25 | |
| 12 | | M4 | 4.50 | 4.68 | 9.4 | 9.6 | 2.55 | |
| 13 | | M5 | 5.50 | 5.68 | 10.40 | 10.65 | 2.58 | |
| 14 | | M6 | 6.60 | 6.82 | 12.60 | 12.85 | 3.13 | |
| 15 | | M8 | 9.00 | 9.22 | 17.30 | 17.55 | 4.28 | |
| 16 | | M10 | 11.00 | 11.27 | 20.0 | 20.3 | 4.65 | |
| 17 | |
| 18 | The model uses the nominal values, d_h and Dc min. (nom.), and the 90 degree angle. The cone's height is then (Dc − d_h) / 2. The table's t, the countersink depth, is given as approximate (≈) and isn't used; it is the depth at Dc max. |
| 19 | |
| 20 | ## Source |
| 21 | |
| 22 | ISO 15065:2005, *Countersinks for countersunk head screws with head configuration in accordance with ISO 7721*, first edition. Clause 3, Figure 1 (the 90° ±1° angle) and Table 1, "Dimensions of countersink", are on page 2 of the official preview: <https://cdn.standards.iteh.ai/samples/37365/57c8c6dac6864ac5a6f7bfa6fdd06111/ISO-15065-2005.pdf>. Table 1's footnote a says d_h is ISO 273's medium series clearance hole, tolerance H13. ISO 15065 also lists tapping screw sizes ST2,2 to ST9,5 and a nominal size 5,5 for ST5,5 only; this recipe offers the metric threads. |
| 23 | |
| 24 | The depth of the hole is yours to set; it isn't part of the standard. |
| 25 | |
| 26 | ## Catalogue models |
| 27 | |
| 28 | The old catalogue's `countersink_clearance_M<n>_cutter` entries (M2, M2.5, M3, M4, M5, M6, M8) name only the thread and have no model to measure. Each maps to this recipe's preset for that thread. |
| 29 |
A solid to cut a countersunk screw's hole with: the 90 degree cone from ISO 15065's countersink diameter Dc down to its clearance hole d_h (ISO 273 medium series), then the hole to the depth you set. Nominal (minimum) Dc and d_h. For screws whose head follows ISO 7721 (ISO 10642, ISO 2009, ISO 7046 and others). See the README.
A solid to cut a countersink and its clearance hole with, for a metric countersunk head screw whose head follows ISO 7721: for example ISO 10642 hexagon socket, ISO 2009 slotted and ISO 7046 cross recessed countersunk screws. Its axis is along Z, with its top face on the XY plane. The 90 degree cone runs from the countersink diameter Dc at the top down to the hole diameter d_h. The hole then runs down to the depth, measured from the top face.
| Thread | d_h min. (nom.) | d_h max. | Dc min. (nom.) | Dc max. | t ≈ |
|---|---|---|---|---|---|
| M1.6 | 1.80 | 1.94 | 3.6 | 3.7 | 0.95 |
| M2 | 2.40 | 2.54 | 4.4 | 4.5 | 1.05 |
| M2.5 | 2.90 | 3.04 | 5.5 | 5.6 | 1.35 |
| M3 | 3.40 | 3.58 | 6.3 | 6.5 | 1.55 |
| M3.5 | 3.90 | 4.08 | 8.2 | 8.4 | 2.25 |
| M4 | 4.50 | 4.68 | 9.4 | 9.6 | 2.55 |
| M5 | 5.50 | 5.68 | 10.40 | 10.65 | 2.58 |
| M6 | 6.60 | 6.82 | 12.60 | 12.85 | 3.13 |
| M8 | 9.00 | 9.22 | 17.30 | 17.55 | 4.28 |
| M10 | 11.00 | 11.27 | 20.0 | 20.3 | 4.65 |
The model uses the nominal values, d_h and Dc min. (nom.), and the 90 degree angle. The cone's height is then (Dc − d_h) / 2. The table's t, the countersink depth, is given as approximate (≈) and isn't used; it is the depth at Dc max.
ISO 15065:2005, Countersinks for countersunk head screws with head configuration in accordance with ISO 7721, first edition. Clause 3, Figure 1 (the 90° ±1° angle) and Table 1, "Dimensions of countersink", are on page 2 of the official preview: https://cdn.standards.iteh.ai/samples/37365/57c8c6dac6864ac5a6f7bfa6fdd06111/ISO-15065-2005.pdf. Table 1's footnote a says d_h is ISO 273's medium series clearance hole, tolerance H13. ISO 15065 also lists tapping screw sizes ST2,2 to ST9,5 and a nominal size 5,5 for ST5,5 only; this recipe offers the metric threads.
The depth of the hole is yours to set; it isn't part of the standard.
The old catalogue's countersink_clearance_M<n>_cutter entries (M2, M2.5, M3, M4, M5, M6, M8) name only the thread and have no model to measure. Each maps to this recipe's preset for that thread.
Clearance hole cylinder for metric bolts and screws, M1.6 to M100: ISO 273 fine, medium and coarse, at the low, middle or high end of H12, H13 or H14.
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.
Hex nut, ISO 4032, M2 to M12.