@code3d/screws 0.0.1-alpha.3 → 0.0.1-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +228 -40
  2. package/bld/chunks/chunk-2DGVQRQ5.js +78 -0
  3. package/bld/chunks/chunk-2DGVQRQ5.js.map +7 -0
  4. package/bld/chunks/chunk-4FMUSJBB.js +27 -0
  5. package/bld/chunks/chunk-4FMUSJBB.js.map +7 -0
  6. package/bld/chunks/chunk-7UGU5EFV.js +87 -0
  7. package/bld/chunks/chunk-7UGU5EFV.js.map +7 -0
  8. package/bld/chunks/chunk-DKS4VANI.js +27 -0
  9. package/bld/chunks/chunk-DKS4VANI.js.map +7 -0
  10. package/bld/chunks/chunk-ES62SR3Q.js +21 -0
  11. package/bld/chunks/chunk-ES62SR3Q.js.map +7 -0
  12. package/bld/chunks/chunk-ESLSQKZW.js +25 -0
  13. package/bld/chunks/chunk-ESLSQKZW.js.map +7 -0
  14. package/bld/chunks/chunk-GAX6375G.js +25 -0
  15. package/bld/chunks/chunk-GAX6375G.js.map +7 -0
  16. package/bld/chunks/chunk-GIIOR3XJ.js +49 -0
  17. package/bld/chunks/chunk-GIIOR3XJ.js.map +7 -0
  18. package/bld/chunks/chunk-HPPYZYCK.js +23 -0
  19. package/bld/chunks/chunk-HPPYZYCK.js.map +7 -0
  20. package/bld/chunks/chunk-IXFHRZSY.js +121 -0
  21. package/bld/chunks/chunk-IXFHRZSY.js.map +7 -0
  22. package/bld/chunks/chunk-MEIKYZ23.js +84 -0
  23. package/bld/chunks/chunk-MEIKYZ23.js.map +7 -0
  24. package/bld/chunks/chunk-O34BMYJV.js +84 -0
  25. package/bld/chunks/chunk-O34BMYJV.js.map +7 -0
  26. package/bld/chunks/chunk-P3M5KQ5U.js +46 -0
  27. package/bld/chunks/chunk-P3M5KQ5U.js.map +7 -0
  28. package/bld/chunks/chunk-PFFNLWWR.js +25 -0
  29. package/bld/chunks/chunk-PFFNLWWR.js.map +7 -0
  30. package/bld/chunks/chunk-SDUJLXOE.js +46 -0
  31. package/bld/chunks/chunk-SDUJLXOE.js.map +7 -0
  32. package/bld/chunks/chunk-SDYJF2XK.js +25 -0
  33. package/bld/chunks/chunk-SDYJF2XK.js.map +7 -0
  34. package/bld/chunks/chunk-SGDNOA44.js +92 -0
  35. package/bld/chunks/chunk-SGDNOA44.js.map +7 -0
  36. package/bld/chunks/chunk-SPFHOFBC.js +125 -0
  37. package/bld/chunks/chunk-SPFHOFBC.js.map +7 -0
  38. package/bld/chunks/chunk-VVX3WOBG.js +160 -0
  39. package/bld/chunks/chunk-VVX3WOBG.js.map +7 -0
  40. package/bld/chunks/chunk-W62ASGIP.js +25 -0
  41. package/bld/chunks/chunk-W62ASGIP.js.map +7 -0
  42. package/bld/chunks/chunk-Z5LEGL77.js +464 -0
  43. package/bld/chunks/chunk-Z5LEGL77.js.map +7 -0
  44. package/bld/chunks/chunk-ZNWKI54A.js +25 -0
  45. package/bld/chunks/chunk-ZNWKI54A.js.map +7 -0
  46. package/bld/library/common.d.ts +104 -0
  47. package/bld/library/common.d.ts.map +1 -0
  48. package/bld/library/gb-2672.d.ts +8 -0
  49. package/bld/library/gb-2672.d.ts.map +1 -0
  50. package/bld/library/gb-2672.js +17 -0
  51. package/bld/library/gb-2672.js.map +7 -0
  52. package/bld/library/gb-5281.d.ts +8 -0
  53. package/bld/library/gb-5281.d.ts.map +1 -0
  54. package/bld/library/gb-5281.js +15 -0
  55. package/bld/library/gb-5281.js.map +7 -0
  56. package/bld/library/gb-5782.d.ts +8 -0
  57. package/bld/library/gb-5782.d.ts.map +1 -0
  58. package/bld/library/gb-5782.js +19 -0
  59. package/bld/library/gb-5782.js.map +7 -0
  60. package/bld/library/gb-5783.d.ts +8 -0
  61. package/bld/library/gb-5783.d.ts.map +1 -0
  62. package/bld/library/gb-5783.js +19 -0
  63. package/bld/library/gb-5783.js.map +7 -0
  64. package/bld/library/gb-70-1.d.ts +8 -0
  65. package/bld/library/gb-70-1.d.ts.map +1 -0
  66. package/bld/library/gb-70-1.js +17 -0
  67. package/bld/library/gb-70-1.js.map +7 -0
  68. package/bld/library/gb-70-2.d.ts +8 -0
  69. package/bld/library/gb-70-2.d.ts.map +1 -0
  70. package/bld/library/gb-70-2.js +17 -0
  71. package/bld/library/gb-70-2.js.map +7 -0
  72. package/bld/library/gb-70-3.d.ts +8 -0
  73. package/bld/library/gb-70-3.d.ts.map +1 -0
  74. package/bld/library/gb-70-3.js +17 -0
  75. package/bld/library/gb-70-3.js.map +7 -0
  76. package/bld/library/gb-70-4.d.ts +8 -0
  77. package/bld/library/gb-70-4.d.ts.map +1 -0
  78. package/bld/library/gb-70-4.js +17 -0
  79. package/bld/library/gb-70-4.js.map +7 -0
  80. package/bld/library/gb-80.d.ts +8 -0
  81. package/bld/library/gb-80.d.ts.map +1 -0
  82. package/bld/library/gb-80.js +13 -0
  83. package/bld/library/gb-80.js.map +7 -0
  84. package/bld/library/gb-818.d.ts +8 -0
  85. package/bld/library/gb-818.d.ts.map +1 -0
  86. package/bld/library/gb-818.js +17 -0
  87. package/bld/library/gb-818.js.map +7 -0
  88. package/bld/library/hex-head.d.ts +18 -0
  89. package/bld/library/hex-head.d.ts.map +1 -0
  90. package/bld/library/index.d.ts +19 -0
  91. package/bld/library/index.d.ts.map +1 -1
  92. package/bld/library/index.js +80 -455
  93. package/bld/library/index.js.map +3 -3
  94. package/bld/library/iso-10642.d.ts +51 -0
  95. package/bld/library/iso-10642.d.ts.map +1 -0
  96. package/bld/library/iso-10642.js +16 -0
  97. package/bld/library/iso-10642.js.map +7 -0
  98. package/bld/library/iso-14583.d.ts +35 -0
  99. package/bld/library/iso-14583.d.ts.map +1 -0
  100. package/bld/library/iso-14583.js +16 -0
  101. package/bld/library/iso-14583.js.map +7 -0
  102. package/bld/library/iso-4014.d.ts +20 -0
  103. package/bld/library/iso-4014.d.ts.map +1 -0
  104. package/bld/library/iso-4014.js +18 -0
  105. package/bld/library/iso-4014.js.map +7 -0
  106. package/bld/library/iso-4017.d.ts +20 -0
  107. package/bld/library/iso-4017.d.ts.map +1 -0
  108. package/bld/library/iso-4017.js +18 -0
  109. package/bld/library/iso-4017.js.map +7 -0
  110. package/bld/library/iso-4029.d.ts +32 -0
  111. package/bld/library/iso-4029.d.ts.map +1 -0
  112. package/bld/library/iso-4029.js +12 -0
  113. package/bld/library/iso-4029.js.map +7 -0
  114. package/bld/library/iso-4762.d.ts +10 -152
  115. package/bld/library/iso-4762.d.ts.map +1 -1
  116. package/bld/library/iso-4762.js +16 -0
  117. package/bld/library/iso-4762.js.map +7 -0
  118. package/bld/library/iso-7045.d.ts +33 -0
  119. package/bld/library/iso-7045.d.ts.map +1 -0
  120. package/bld/library/iso-7045.js +16 -0
  121. package/bld/library/iso-7045.js.map +7 -0
  122. package/bld/library/iso-7379.d.ts +56 -0
  123. package/bld/library/iso-7379.d.ts.map +1 -0
  124. package/bld/library/iso-7379.js +14 -0
  125. package/bld/library/iso-7379.js.map +7 -0
  126. package/bld/library/iso-7380-1.d.ts +31 -0
  127. package/bld/library/iso-7380-1.d.ts.map +1 -0
  128. package/bld/library/iso-7380-1.js +16 -0
  129. package/bld/library/iso-7380-1.js.map +7 -0
  130. package/bld/library/iso-7380-2.d.ts +33 -0
  131. package/bld/library/iso-7380-2.d.ts.map +1 -0
  132. package/bld/library/iso-7380-2.js +16 -0
  133. package/bld/library/iso-7380-2.js.map +7 -0
  134. package/package.json +82 -2
  135. package/src/library/common.ts +367 -0
  136. package/src/library/gb-2672.ts +7 -0
  137. package/src/library/gb-5281.ts +7 -0
  138. package/src/library/gb-5782.ts +7 -0
  139. package/src/library/gb-5783.ts +7 -0
  140. package/src/library/gb-70-1.ts +7 -0
  141. package/src/library/gb-70-2.ts +7 -0
  142. package/src/library/gb-70-3.ts +7 -0
  143. package/src/library/gb-70-4.ts +7 -0
  144. package/src/library/gb-80.ts +7 -0
  145. package/src/library/gb-818.ts +7 -0
  146. package/src/library/hex-head.ts +53 -0
  147. package/src/library/index.ts +20 -0
  148. package/src/library/iso-10642.ts +173 -0
  149. package/src/library/iso-14583.ts +181 -0
  150. package/src/library/iso-4014.ts +64 -0
  151. package/src/library/iso-4017.ts +62 -0
  152. package/src/library/iso-4029.ts +101 -0
  153. package/src/library/iso-4762.ts +70 -300
  154. package/src/library/iso-7045.ts +134 -0
  155. package/src/library/iso-7379.ts +230 -0
  156. package/src/library/iso-7380-1.ts +110 -0
  157. package/src/library/iso-7380-2.ts +135 -0
  158. package/src/library/thread.ts +7 -1
package/README.md CHANGED
@@ -1,64 +1,252 @@
1
1
  # `@code3d/screws`
2
2
 
3
- Reusable standard screw models and matching Boolean hole tools for code3d.
3
+ ISO and GB/T screw models with helical threads, named mounting references, and
4
+ Boolean clearance-hole tools. All dimensions are in millimetres.
5
+
6
+ Install `@code3d/core` and `@code3d/screws` together. The App supplies both when
7
+ using its built-in Core.
4
8
 
5
9
  ```ts
6
- import {ISO4762} from '@code3d/screws';
10
+ import * as ISO10642 from '@code3d/screws/iso10642';
11
+ import * as ISO4762 from '@code3d/screws/iso4762';
12
+ import * as ISO7380_1 from '@code3d/screws/iso7380-1';
13
+
14
+ const countersunk = ISO10642.screw('M6', 20);
15
+ const socketCap = ISO4762.screw('M6', 18);
16
+ const button = ISO7380_1.screw('M6', 18);
17
+ ```
18
+
19
+ Each standard has a public subpath with its own constructors, specifications
20
+ and types. Prefer these subpaths to load only the selected standards and their
21
+ shared code. The root also exports the same modules as namespaces. Multipart
22
+ standard numbers use hyphens in subpaths and underscores in namespace names.
23
+
24
+ ## ISO standards and sizes
25
+
26
+ | Namespace | Import subpath | Form | Presets |
27
+ | ----------- | -------------------------- | ---------------------------------- | ---------------------------- |
28
+ | `ISO4762` | `@code3d/screws/iso4762` | Hexagon socket cap | M3–M12 |
29
+ | `ISO10642` | `@code3d/screws/iso10642` | Countersunk hexagon socket | M3–M12 |
30
+ | `ISO7380_1` | `@code3d/screws/iso7380-1` | Button hexagon socket | M3–M12 |
31
+ | `ISO4017` | `@code3d/screws/iso4017` | Fully threaded hexagon head | M3–M12 |
32
+ | `ISO4014` | `@code3d/screws/iso4014` | Partially threaded hexagon head | M3–M12 |
33
+ | `ISO7380_2` | `@code3d/screws/iso7380-2` | Button hexagon socket with collar | M3–M12 |
34
+ | `ISO4029` | `@code3d/screws/iso4029` | Cup-point hexagon socket set screw | M3–M12 |
35
+ | `ISO7045` | `@code3d/screws/iso7045` | H/Z cross-recessed pan head | M3–M10 |
36
+ | `ISO14583` | `@code3d/screws/iso14583` | Hexalobular pan head | M3–M10 |
37
+ | `ISO7379` | `@code3d/screws/iso7379` | Hexagon socket shoulder screw | Shoulder Ø6.5, 8, 10, 13, 16 |
38
+
39
+ Metric presets are M3, M4, M5, M6, M8, M10, and M12 where listed. All use coarse
40
+ pitch. ISO 7379's shoulder sizes correspond to M5, M6, M8, M10, and M12 threads.
41
+
42
+ ## GB/T standards
43
+
44
+ GB/T entries use `gb` followed by the standard number. A decimal part becomes
45
+ a hyphen in the subpath and an underscore in the root namespace:
46
+
47
+ ```ts
48
+ import * as GB70_1 from '@code3d/screws/gb70-1';
49
+ import * as GB70_3 from '@code3d/screws/gb70-3';
50
+ import * as GB5783 from '@code3d/screws/gb5783';
51
+
52
+ const socketCap = GB70_1.screw('M6', 18);
53
+ const countersunk = GB70_3.screw('M6', 20);
54
+ const hexBolt = GB5783.screw('M6', 30);
55
+ ```
7
56
 
8
- const screw = ISO4762.screw('M6', 18);
9
- const hole = ISO4762.clearanceHole('M6', 10);
57
+ The editions below are current as checked on 2026-09-12. Each standard links
58
+ to its national standards record. These entries share nominal model dimensions
59
+ and constructors with the corresponding ISO module **within the listed preset
60
+ range**, including its types, length convention, drive options and mounting
61
+ references. They do not assert that the complete GB/T and ISO product standards
62
+ are identical: the adoption is modified (MOD), except GB/T 5281 (EQV).
63
+
64
+ | Namespace | Subpath suffix | GB/T edition | ISO model | Presets |
65
+ | --------- | -------------- | ------------------------------------------------------------------------------------------------- | ----------- | ---------------------------- |
66
+ | `GB70_1` | `gb70-1` | [70.1-2008](https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D7F825D3A7E05397BE0A0AB82A) | `ISO4762` | M3–M12 |
67
+ | `GB70_2` | `gb70-2` | [70.2-2025](https://openstd.samr.gov.cn/bzgk/std/newGbInfo?hcno=6F19BF92846B48BF27058E2B5299935E) | `ISO7380_1` | M3–M12 |
68
+ | `GB70_3` | `gb70-3` | [70.3-2023](https://std.samr.gov.cn/gb/search/gbDetailed?id=FC816D05003162EBE05397BE0A0AD5FA) | `ISO10642` | M3–M12 |
69
+ | `GB70_4` | `gb70-4` | [70.4-2025](https://std.samr.gov.cn/gb/search/gbDetailed?id=42BA7D06A4DCE936E06397BE0A0ACDC9) | `ISO7380_2` | M3–M12 |
70
+ | `GB5782` | `gb5782` | [5782-2025](https://std.samr.gov.cn/gb/search/gbDetailed?id=jAnZliYiA5M%3D&mode=p) | `ISO4014` | M3–M12 |
71
+ | `GB5783` | `gb5783` | [5783-2025](https://std.samr.gov.cn/gb/search/gbDetailed?id=42BA7D06A331E936E06397BE0A0ACDC9) | `ISO4017` | M3–M12 |
72
+ | `GB818` | `gb818` | [818-2016](https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D813A1D3A7E05397BE0A0AB82A) | `ISO7045` | M3–M10 |
73
+ | `GB2672` | `gb2672` | [2672-2017](https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D818CAD3A7E05397BE0A0AB82A) | `ISO14583` | M3–M10 |
74
+ | `GB80` | `gb80` | [80-2007](https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D7890DD3A7E05397BE0A0AB82A) | `ISO4029` | M3–M12 |
75
+ | `GB5281` | `gb5281` | [5281-1985](https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D7AF1AD3A7E05397BE0A0AB82A) | `ISO7379` | Shoulder Ø6.5, 8, 10, 13, 16 |
76
+
77
+ The 2025 editions of GB/T 70.2, 70.4, 5782 and 5783 took effect on
78
+ 2026-02-01. Presets remain the selected coarse sizes above; additions outside
79
+ that set, such as M7 hexagon bolts and the M16 button-screw thread-length rule,
80
+ are not included. Material, strength, coating, marking and tolerance
81
+ requirements are outside the model scope. In particular, GB/T 5782/5783 use
82
+ the modern M10/M12 hexagon widths of 16/18 mm, not older 17/19 mm variants.
83
+
84
+ GB/T 70.1 holes include a counterbore by default; GB/T 70.3 holes include a
85
+ 90° countersink. Other headed GB/T entries accept an optional `counterbore`;
86
+ GB/T 5281 takes a numeric shoulder diameter, and GB/T 80 has no clearance-hole
87
+ constructor. The hole tools retain the ISO modules' fit and recess allowances
88
+ described below; **they do not implement the GB/T 152 countersink/counterbore
89
+ tables**. Use custom dimensions when a drawing specifies a particular hole.
90
+
91
+ ```ts
92
+ import * as GB5281 from '@code3d/screws/gb5281';
93
+
94
+ const hole = GB5281.clearanceHole(8, {
95
+ depth: 12,
96
+ diameter: 8.5,
97
+ counterbore: {diameter: 15, depth: 7},
98
+ });
99
+ const shoulder = GB5281.screw(8, 20).relate(part =>
100
+ part.headBottom.on(hole.counterboreBottom),
101
+ );
10
102
  ```
11
103
 
12
- Clearance holes use the ISO 273 normal clearance and include the matching
13
- socket-head counterbore by default, for both the numeric overload and an
14
- options object. Pass `counterbore: false` explicitly to create a plain
15
- clearance hole; the options object also supports another fit or custom
16
- dimensions.
104
+ ## Length and mounting
17
105
 
18
- ## Specification queries
106
+ For ordinary headed screws, `screw(size, length)` measures length below the
107
+ head. ISO 10642 includes the countersunk head in `length`; ISO 4029 measures
108
+ the entire headless screw.
19
109
 
20
- `ISO4762.resolveSpecification(input)` accepts a size such as `'M6'` or a
21
- custom `ISO4762.Specification`. A size resolves to its entry in
22
- `ISO4762.specifications`; a specification object is returned unchanged.
110
+ Headed screws expose `headTop`, `headBottom`, `shankTop`, `shankBottom`, and
111
+ `shankAxis`. ISO 4029 instead exposes `driveTop`, `pointBottom`, and `threadAxis`.
112
+ Lengths are along local Y; heads/drives face +Y and tips face −Y.
23
113
 
24
- `ISO4762.threadLength(spec, length)` returns the nominal thread length used
25
- by the screw builder, in millimeters. `length` is the screw length below the
26
- head. This query does not clamp the result to the available shank length;
27
- `screw()` applies that limit after allowing for the under-head transition.
114
+ ISO 7379 takes the nominal **shoulder diameter and shoulder length**:
28
115
 
29
116
  ```ts
30
- const spec = ISO4762.resolveSpecification('M6');
31
- const nominalThreadLength = ISO4762.threadLength(spec, 30); // 24 mm
117
+ import * as ISO7379 from '@code3d/screws/iso7379';
118
+
119
+ const shoulder = ISO7379.screw(8, 20); // Ø8 × 20 shoulder, M6 × 11 projection
120
+ const spec = ISO7379.resolveSpecification(8);
121
+ // Overall length = spec.headHeight + 20 + spec.threadLength.
32
122
  ```
33
123
 
34
- The `ISO4762` namespace also exports the types used by these APIs, including
35
- `Specification`, `ScrewInput`, `SocketCapScrewElements`,
36
- `SocketCapHoleElements`, and `CounterboredSocketCapHoleElements`.
124
+ Its references are `headTop`, `headBottom`, `shoulderTop`, `shoulderBottom`,
125
+ `shoulderAxis`, `threadTop`, `threadBottom`, and `threadAxis`. The threaded
126
+ projection includes its reduced neck. The shoulder length includes the relief
127
+ beneath the head. The shoulder body uses the maximum h8 diameter, e.g. 7.99 mm
128
+ for the Ø8 preset.
129
+
130
+ ## Clearance tools
131
+
132
+ Use a hole model with `cut(stock, [hole])` and its named references for mounting.
133
+ For headed metric screws, `fit: 'close' | 'normal' | 'loose'` selects ISO 273
134
+ clearance; the default is `normal`. A custom `diameter` overrides it.
135
+
136
+ - ISO 4762 includes a counterbore by default. Set `counterbore: false` for a
137
+ plain hole.
138
+ - ISO 10642 includes a 90° countersink by default. Set `countersink: false` for
139
+ a plain hole, or `countersink: {diameter: ...}` to change the opening. Its
140
+ depth follows from the opening and passage diameters at the fixed 90° angle.
141
+ - The other ordinary headed standards default to a plain hole. Set
142
+ `counterbore: true` or `{diameter, depth, axialClearance}` to recess the head.
143
+ - ISO 7379 creates a shoulder passage with 0.2 mm diametral clearance by
144
+ default; `{depth, diameter}` controls a custom passage. Add `counterbore: true`
145
+ or `{diameter, depth, axialClearance}` to recess its head. The shoulder
146
+ allowance is a modeling default, not an ISO 273 fit.
147
+ - ISO 4029 has no clearance-hole constructor; its mating feature is threaded.
148
+
149
+ `depth` always measures the complete cutting tool. Counterbores default to
150
+ head height + 0.5 mm depth and head diameter + 1 mm diameter (ISO 4762 uses
151
+ its dedicated counterbore table). Countersinks default to head diameter +
152
+ 0.5 mm. These recess allowances are modeling defaults, not dimensions imposed
153
+ by the screw product standards.
154
+
155
+ ISO 7379 supports the same counterbore options as ordinary headed standards:
37
156
 
38
- The package currently implements ISO 4762 socket-head cap screws. Its source
39
- is organized by standard so additional screw families can be added without
40
- mixing their dimensional tables or model-specific elements.
157
+ ```ts
158
+ import * as ISO7379 from '@code3d/screws/iso7379';
159
+
160
+ const hole = ISO7379.clearanceHole(8, {
161
+ depth: 12, // Total tool depth, including the counterbore.
162
+ diameter: 8.5, // Shoulder passage diameter.
163
+ counterbore: {diameter: 15, depth: 7},
164
+ });
165
+ const shoulder = ISO7379.screw(8, 20).relate(part =>
166
+ part.headBottom.on(hole.counterboreBottom),
167
+ );
168
+ ```
41
169
 
42
- Named mounting references such as `headBottom`, `shaftBottom`, and
43
- `counterboreBottom` are finite `Bound` values. For example,
44
- `tool.shaftBottom.on(plate.down.flip())` aligns the shaft's lower boundary with
45
- the plate's lower boundary without rotating the hole tool. `flip()` reverses
46
- facing while preserving the offset coordinate frame.
170
+ Use `counterbore: true` for preset allowances. Within the counterbore options,
171
+ `axialClearance` sets the extra depth above the head; an explicit `depth`
172
+ overrides it. For example, `{axialClearance: 0}` seats the head flush.
47
173
 
48
- ## Install and explore
174
+ ```ts
175
+ import {box, cut} from '@code3d/core';
176
+ import * as ISO10642 from '@code3d/screws/iso10642';
177
+
178
+ const stock = box(30, 10, 30);
179
+ const hole = ISO10642.clearanceHole('M6', 10);
180
+ const plate = cut(stock, [hole]);
181
+ const screw = ISO10642.screw('M6', 20).relate(part =>
182
+ part.headTop.on(hole.countersinkTop),
183
+ );
184
+ ```
49
185
 
50
- The App includes Screws when using its built-in Core. In Node or a project with
51
- its own Core installation, install both packages:
186
+ All hole models expose `shaftTop`, `shaftBottom`, and `shaftAxis`. Counterbored
187
+ holes add `counterboreTop`/`counterboreBottom`; countersunk holes add
188
+ `countersinkTop`/`countersinkBottom`. Plain-hole return types omit these recess
189
+ references. Named boundaries are finite `Bound` values. For example,
190
+ `tool.shaftBottom.on(plate.down.flip())` places a hole against the plate's lower
191
+ boundary without rotating it; `flip()` reverses facing and preserves its offset
192
+ coordinate frame. See the [socket-cap mounting example](../app/examples/assemblies/screw-box/model.ts).
193
+
194
+ ## Specifications and drives
195
+
196
+ Each module exports `specifications`, `resolveSpecification(input)`, `Size`,
197
+ `Specification`, `ScrewInput`, and `Screw`. A supplied specification object is
198
+ returned unchanged, so callers can derive custom dimensions from a preset.
199
+
200
+ Ordinary headed modules also expose `threadLength(spec, length)`. This returns
201
+ the nominal thread length before the builder limits it to the available shaft
202
+ and allows for its under-head transition. ISO 4017 threads the entire available
203
+ shaft; ISO 4014 retains the unthreaded portion on longer bolts. ISO 7379's
204
+ threaded projection is the fixed `spec.threadLength`; ISO 4029 is fully threaded.
205
+
206
+ ISO 7045 defaults to type H and accepts `{recess: 'Z'}`. ISO 14583 selects its
207
+ hexalobular recess number and dimensions from the screw size.
208
+
209
+ ```ts
210
+ import * as ISO7045 from '@code3d/screws/iso7045';
52
211
 
53
- ```sh
54
- npm install @code3d/core @code3d/screws
212
+ const zDrive = ISO7045.screw('M4', 16, {recess: 'Z'});
55
213
  ```
56
214
 
57
- - [Public exports](src/library/index.ts), [ISO 4762 definitions and builders](src/library/iso-4762.ts),
58
- and [thread geometry](src/library/thread.ts).
59
- - [Complete mounting example](../app/examples/website/fastener.ts) and [behavior tests](test/iso-4762.test.ts).
60
- - [Core relations and topology](../core/README.md), [modeling reference](../web/src/content/docs/docs/reference/screws.mdx),
61
- and [agent modeling workflow](../../docs/agents/modeling.md).
215
+ ## Dimension sources and modeling scope
216
+
217
+ These models support layout, visualization and Boolean assembly checks.
218
+ Preset head, drive, shoulder and thread dimensions follow the linked tables;
219
+ ISO and DIN dimensions are kept distinct (notably ISO 10642 heads, M10/M12 hex
220
+ widths, and ISO 7045 M3/M5 heads).
221
+
222
+ - [ISO 10642 dimensional drawing, VIPA](https://www.vipafasteners.com/files/0/886-HEXAGON_SOCKET_COUNTERSUNK_HEAD_SCREWS_ISO_10642_UNI_5933_DIN_7991.pdf)
223
+ - [ISO 4014/4017 head and partial-thread dimensions, VIPA](https://www.vipafasteners.com/files/0/801-PARTIAL_THREAD_HEXAGON_HEAD_SCREWS_ISO_4014_UNI_5737_DIN_931.pdf)
224
+ - [ISO 7380-1, Böllhoff](https://eshop-ro.boellhoff.com/out/media/pdf/ISO_7380-1_Stahl_10.9_Innensechskant___en.pdf)
225
+ and [ISO 7380-2, Böllhoff](https://eshop-cz.boellhoff.com/out/media/pdf/ISO_7380-2_Edelstahl_A2_Innensechskant___en.pdf)
226
+ - [ISO 4029 / DIN 916, JC Fasteners](https://www.jcfasteners.com/wp-content/uploads/DIN-916-Grub-Screw-Cup-PT-B4A07-SS304.pdf)
227
+ - [ISO 7045](https://www.finesz.com/ISO7045.php), [ISO 14583](https://www.finesz.com/ISO14583.php),
228
+ and [ISO 7379](https://www.finesz.com/ISO7379.php), Fine Fasteners
229
+ - [ISO 10664:2014 basic hexalobular dimensions](https://cdn.standards.iteh.ai/samples/63207/f79670cf0a214881aa40b4822580cce3/ISO-10664-2014.pdf)
230
+
231
+ Threads use a swept coarse-pitch profile with faded, axially trimmed ends.
232
+ Under-head transitions and shoulder reliefs are simplified. Rounded heads
233
+ include a small flat crown around the recess. Cross recesses use tapered wings
234
+ with additional ribs for Z; hexalobular recesses use twelve tangent circular arcs
235
+ with the nominal A/B envelope. Socket bottoms omit drill-point details. Cup
236
+ points use a conical cavity and a narrow annular lip. These are nominal modeling
237
+ representations, not manufacturing or inspection-gauge geometry. Tolerance
238
+ stacks, coatings, strength grades and complete standard length series are not
239
+ modeled; positive lengths must leave room for the relevant head, relief and
240
+ thread features.
241
+
242
+ ## Source and verification
243
+
244
+ [Complete mounting example](../app/examples/assemblies/screw-box/model.ts),
245
+ [ISO gallery](../app/examples/iso-screws.ts),
246
+ [GB/T gallery](../app/examples/gb-screws.ts),
247
+ [public modules](src/library/index.ts), [geometry tests](test/standards.test.ts),
248
+ [modeling reference](../web/src/content/docs/docs/reference/screws.mdx), and
249
+ [agent modeling workflow](../../docs/agents/modeling.md).
62
250
 
63
251
  From the repository root, run `npm run build:packages` and
64
252
  `npm test --workspace @code3d/screws`.
@@ -0,0 +1,78 @@
1
+ import {
2
+ __export,
3
+ __name,
4
+ clearanceHole,
5
+ headedScrew,
6
+ hexSocket,
7
+ metric,
8
+ roundHead,
9
+ validateHead
10
+ } from "./chunk-Z5LEGL77.js";
11
+
12
+ // packages/screws/src/library/iso-7380-1.ts
13
+ var iso_7380_1_exports = {};
14
+ __export(iso_7380_1_exports, {
15
+ clearanceHole: () => clearanceHole2,
16
+ resolveSpecification: () => resolveSpecification,
17
+ screw: () => screw,
18
+ specifications: () => specifications,
19
+ threadLength: () => threadLength
20
+ });
21
+ function specification(size, headDiameter, headHeight, hexSocketWidth, hexSocketDepth, underHeadRadius) {
22
+ return {
23
+ ...metric(size),
24
+ headDiameter,
25
+ headHeight,
26
+ hexSocketWidth,
27
+ hexSocketDepth,
28
+ underHeadRadius
29
+ };
30
+ }
31
+ __name(specification, "specification");
32
+ var specifications = {
33
+ M3: specification("M3", 5.7, 1.65, 2, 1.04, 0.1),
34
+ M4: specification("M4", 7.6, 2.2, 2.5, 1.3, 0.2),
35
+ M5: specification("M5", 9.5, 2.75, 3, 1.56, 0.2),
36
+ M6: specification("M6", 10.5, 3.3, 4, 2.08, 0.25),
37
+ M8: specification("M8", 14, 4.4, 5, 2.6, 0.4),
38
+ M10: specification("M10", 17.5, 5.5, 6, 3.12, 0.4),
39
+ M12: specification("M12", 21, 6.6, 8, 4.16, 0.6)
40
+ };
41
+ function resolveSpecification(input) {
42
+ return typeof input === "string" ? specifications[input] : input;
43
+ }
44
+ __name(resolveSpecification, "resolveSpecification");
45
+ function threadLength(spec, _length) {
46
+ return 2 * spec.nominalDiameter + 12;
47
+ }
48
+ __name(threadLength, "threadLength");
49
+ function screw(input, length) {
50
+ const spec = resolveSpecification(input);
51
+ validateHead(spec);
52
+ const blank = roundHead(
53
+ spec.headDiameter,
54
+ spec.headHeight,
55
+ Math.max(spec.nominalDiameter, spec.hexSocketWidth * 1.3)
56
+ );
57
+ return headedScrew(
58
+ hexSocket(blank, spec.hexSocketWidth, spec.hexSocketDepth, spec.headHeight),
59
+ spec,
60
+ length,
61
+ threadLength(spec, length)
62
+ );
63
+ }
64
+ __name(screw, "screw");
65
+ function clearanceHole2(input, options) {
66
+ return clearanceHole(resolveSpecification(input), options);
67
+ }
68
+ __name(clearanceHole2, "clearanceHole");
69
+
70
+ export {
71
+ specifications,
72
+ resolveSpecification,
73
+ threadLength,
74
+ screw,
75
+ clearanceHole2 as clearanceHole,
76
+ iso_7380_1_exports
77
+ };
78
+ //# sourceMappingURL=chunk-2DGVQRQ5.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/library/iso-7380-1.ts"],
4
+ "sourcesContent": ["import {\n metric,\n validateHead,\n headedScrew,\n hexSocket,\n roundHead,\n clearanceHole as buildClearanceHole,\n type HeadSpecification,\n type MetricSize,\n type Screw,\n type ClearanceHole,\n type CounterboredHole,\n type ClearanceHoleOptions,\n type PlainHoleOptions,\n type CounterboredHoleOptions,\n} from './common.js';\nexport type {\n ClearanceFit,\n Screw,\n ScrewElements,\n ClearanceHole,\n HoleElements,\n CounterboredHole,\n CounterboredHoleElements,\n ClearanceHoleOptions,\n PlainHoleOptions,\n CounterboredHoleOptions,\n CounterboreOptions,\n} from './common.js';\n\nexport type Specification = HeadSpecification &\n Readonly<{hexSocketWidth: number; hexSocketDepth: number}>;\n\n// ISO 7380-1, k/dk maxima and nominal drive dimensions; millimetres.\n// https://eshop-ro.boellhoff.com/out/media/pdf/ISO_7380-1_Stahl_10.9_Innensechskant___en.pdf\nfunction specification(\n size: MetricSize,\n headDiameter: number,\n headHeight: number,\n hexSocketWidth: number,\n hexSocketDepth: number,\n underHeadRadius: number,\n): Specification {\n return {\n ...metric(size),\n headDiameter,\n headHeight,\n hexSocketWidth,\n hexSocketDepth,\n underHeadRadius,\n };\n}\nexport const specifications = {\n M3: specification('M3', 5.7, 1.65, 2, 1.04, 0.1),\n M4: specification('M4', 7.6, 2.2, 2.5, 1.3, 0.2),\n M5: specification('M5', 9.5, 2.75, 3, 1.56, 0.2),\n M6: specification('M6', 10.5, 3.3, 4, 2.08, 0.25),\n M8: specification('M8', 14, 4.4, 5, 2.6, 0.4),\n M10: specification('M10', 17.5, 5.5, 6, 3.12, 0.4),\n M12: specification('M12', 21, 6.6, 8, 4.16, 0.6),\n} as const;\nexport type Size = keyof typeof specifications;\nexport type ScrewInput = Size | Specification;\nexport function resolveSpecification(input: ScrewInput): Specification {\n return typeof input === 'string' ? specifications[input] : input;\n}\n/** Nominal partial thread b; the builder limits it to the available shank. */\nexport function threadLength(spec: Specification, _length: number): number {\n return 2 * spec.nominalDiameter + 12;\n}\n/**\n * @code3d.arguments ['M6', 18]\n * @code3d.param length {kind: 'length'}\n */\nexport function screw(input: ScrewInput, length: number): Screw {\n const spec = resolveSpecification(input);\n validateHead(spec);\n const blank = roundHead(\n spec.headDiameter,\n spec.headHeight,\n Math.max(spec.nominalDiameter, spec.hexSocketWidth * 1.3),\n );\n return headedScrew(\n hexSocket(blank, spec.hexSocketWidth, spec.hexSocketDepth, spec.headHeight),\n spec,\n length,\n threadLength(spec, length),\n );\n}\n\n/** @code3d.arguments ['M6', 10] */\nexport function clearanceHole(input: ScrewInput, depth: number): ClearanceHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: PlainHoleOptions,\n): ClearanceHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: CounterboredHoleOptions,\n): CounterboredHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: ClearanceHoleOptions,\n): ClearanceHole | CounterboredHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: number | ClearanceHoleOptions,\n): ClearanceHole | CounterboredHole {\n return buildClearanceHole(resolveSpecification(input), options);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,uBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAmCA,SAAS,cACP,MACA,cACA,YACA,gBACA,gBACA,iBACe;AACf,SAAO;AAAA,IACL,GAAG,OAAO,IAAI;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAhBS;AAiBF,IAAM,iBAAiB;AAAA,EAC5B,IAAI,cAAc,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG;AAAA,EAC/C,IAAI,cAAc,MAAM,KAAK,KAAK,KAAK,KAAK,GAAG;AAAA,EAC/C,IAAI,cAAc,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG;AAAA,EAC/C,IAAI,cAAc,MAAM,MAAM,KAAK,GAAG,MAAM,IAAI;AAAA,EAChD,IAAI,cAAc,MAAM,IAAI,KAAK,GAAG,KAAK,GAAG;AAAA,EAC5C,KAAK,cAAc,OAAO,MAAM,KAAK,GAAG,MAAM,GAAG;AAAA,EACjD,KAAK,cAAc,OAAO,IAAI,KAAK,GAAG,MAAM,GAAG;AACjD;AAGO,SAAS,qBAAqB,OAAkC;AACrE,SAAO,OAAO,UAAU,WAAW,eAAe,KAAK,IAAI;AAC7D;AAFgB;AAIT,SAAS,aAAa,MAAqB,SAAyB;AACzE,SAAO,IAAI,KAAK,kBAAkB;AACpC;AAFgB;AAOT,SAAS,MAAM,OAAmB,QAAuB;AAC9D,QAAM,OAAO,qBAAqB,KAAK;AACvC,eAAa,IAAI;AACjB,QAAM,QAAQ;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK,IAAI,KAAK,iBAAiB,KAAK,iBAAiB,GAAG;AAAA,EAC1D;AACA,SAAO;AAAA,IACL,UAAU,OAAO,KAAK,gBAAgB,KAAK,gBAAgB,KAAK,UAAU;AAAA,IAC1E;AAAA,IACA;AAAA,IACA,aAAa,MAAM,MAAM;AAAA,EAC3B;AACF;AAdgB;AA8BT,SAASC,eACd,OACA,SACkC;AAClC,SAAO,cAAmB,qBAAqB,KAAK,GAAG,OAAO;AAChE;AALgB,OAAAA,gBAAA;",
6
+ "names": ["clearanceHole", "clearanceHole"]
7
+ }
@@ -0,0 +1,27 @@
1
+ import {
2
+ clearanceHole,
3
+ resolveSpecification,
4
+ screw,
5
+ threadLength
6
+ } from "./chunk-SDUJLXOE.js";
7
+ import {
8
+ specifications
9
+ } from "./chunk-GIIOR3XJ.js";
10
+ import {
11
+ __export
12
+ } from "./chunk-Z5LEGL77.js";
13
+
14
+ // packages/screws/src/library/gb-5782.ts
15
+ var gb_5782_exports = {};
16
+ __export(gb_5782_exports, {
17
+ clearanceHole: () => clearanceHole,
18
+ resolveSpecification: () => resolveSpecification,
19
+ screw: () => screw,
20
+ specifications: () => specifications,
21
+ threadLength: () => threadLength
22
+ });
23
+
24
+ export {
25
+ gb_5782_exports
26
+ };
27
+ //# sourceMappingURL=chunk-4FMUSJBB.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/library/gb-5782.ts"],
4
+ "sourcesContent": ["/**\n * GB/T 5782-2025 (MOD ISO 4014:2022).\n * Shares the corresponding ISO module's nominal geometry within our preset\n * range. See the package README for sizes, hole allowances and modeling limits.\n * https://std.samr.gov.cn/gb/search/gbDetailed?id=jAnZliYiA5M%3D&mode=p\n */\nexport * from './iso-4014.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,87 @@
1
+ import {
2
+ __export,
3
+ __name,
4
+ clearanceHole,
5
+ crossSocket,
6
+ headedScrew,
7
+ metric,
8
+ panHead,
9
+ validateHead
10
+ } from "./chunk-Z5LEGL77.js";
11
+
12
+ // packages/screws/src/library/iso-7045.ts
13
+ var iso_7045_exports = {};
14
+ __export(iso_7045_exports, {
15
+ clearanceHole: () => clearanceHole2,
16
+ resolveSpecification: () => resolveSpecification,
17
+ screw: () => screw,
18
+ specifications: () => specifications,
19
+ threadLength: () => threadLength
20
+ });
21
+ function specification(size, headDiameter, headHeight, headCurvatureRadius, underHeadRadius, number, width, hDiameter, hDepth, zDiameter, zDepth) {
22
+ return {
23
+ ...metric(size),
24
+ headDiameter,
25
+ headHeight,
26
+ headCurvatureRadius,
27
+ underHeadRadius,
28
+ recesses: {
29
+ H: { number, width, diameter: hDiameter, depth: hDepth },
30
+ Z: { number, width, diameter: zDiameter, depth: zDepth }
31
+ }
32
+ };
33
+ }
34
+ __name(specification, "specification");
35
+ var specifications = {
36
+ M3: specification("M3", 5.6, 2.4, 5, 0.1, 1, 0.97, 3, 1.4, 2.8, 1.5),
37
+ M4: specification("M4", 8, 3.1, 6.5, 0.2, 2, 1.47, 4.4, 1.9, 4.3, 1.89),
38
+ M5: specification("M5", 9.5, 3.7, 8, 0.2, 2, 1.47, 4.9, 2.4, 4.7, 2.29),
39
+ M6: specification("M6", 12, 4.6, 10, 0.25, 3, 2.41, 6.9, 3.1, 6.7, 3.03),
40
+ M8: specification("M8", 16, 6, 13, 0.4, 4, 3.48, 9, 4, 8.8, 4.05),
41
+ M10: specification("M10", 20, 7.5, 16, 0.4, 4, 3.48, 10.1, 5.2, 9.9, 5.24)
42
+ };
43
+ function resolveSpecification(input) {
44
+ return typeof input === "string" ? specifications[input] : input;
45
+ }
46
+ __name(resolveSpecification, "resolveSpecification");
47
+ function threadLength(spec, _length) {
48
+ return spec.nominalDiameter <= 3 ? 25 : 38;
49
+ }
50
+ __name(threadLength, "threadLength");
51
+ function screw(input, length, options = {}) {
52
+ const spec = resolveSpecification(input);
53
+ validateHead(spec);
54
+ const type = options.recess ?? "H";
55
+ if (type !== "H" && type !== "Z")
56
+ throw new Error("Cross recess type must be H or Z.");
57
+ const recess = spec.recesses[type];
58
+ if (recess.depth >= spec.headHeight || recess.width >= recess.diameter)
59
+ throw new Error("Cross recess must fit inside the head.");
60
+ const blank = panHead(
61
+ spec.headDiameter,
62
+ spec.headHeight,
63
+ recess.diameter * 1.05,
64
+ spec.headCurvatureRadius
65
+ );
66
+ return headedScrew(
67
+ crossSocket(blank, recess, type),
68
+ spec,
69
+ length,
70
+ threadLength(spec, length)
71
+ );
72
+ }
73
+ __name(screw, "screw");
74
+ function clearanceHole2(input, options) {
75
+ return clearanceHole(resolveSpecification(input), options);
76
+ }
77
+ __name(clearanceHole2, "clearanceHole");
78
+
79
+ export {
80
+ specifications,
81
+ resolveSpecification,
82
+ threadLength,
83
+ screw,
84
+ clearanceHole2 as clearanceHole,
85
+ iso_7045_exports
86
+ };
87
+ //# sourceMappingURL=chunk-7UGU5EFV.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/library/iso-7045.ts"],
4
+ "sourcesContent": ["import {\n metric,\n validateHead,\n headedScrew,\n panHead,\n crossSocket,\n clearanceHole as buildClearanceHole,\n type CrossRecessType,\n type CrossRecess,\n type HeadSpecification,\n type MetricSize,\n type Screw,\n type ClearanceHole,\n type CounterboredHole,\n type ClearanceHoleOptions,\n type PlainHoleOptions,\n type CounterboredHoleOptions,\n} from './common.js';\nexport type {\n CrossRecessType,\n CrossRecess,\n ClearanceFit,\n Screw,\n ScrewElements,\n ClearanceHole,\n HoleElements,\n CounterboredHole,\n CounterboredHoleElements,\n ClearanceHoleOptions,\n PlainHoleOptions,\n CounterboredHoleOptions,\n CounterboreOptions,\n} from './common.js';\n\nexport type Specification = HeadSpecification &\n Readonly<{\n headCurvatureRadius: number;\n recesses: Readonly<Record<CrossRecessType, CrossRecess>>;\n }>;\nexport type ScrewOptions = Readonly<{recess?: CrossRecessType}>;\n// ISO 7045:2011 (M3 and M5 heads differ from DIN 7985). H/Z driving envelopes.\n// https://www.finesz.com/ISO7045.php\nfunction specification(\n size: MetricSize,\n headDiameter: number,\n headHeight: number,\n headCurvatureRadius: number,\n underHeadRadius: number,\n number: number,\n width: number,\n hDiameter: number,\n hDepth: number,\n zDiameter: number,\n zDepth: number,\n): Specification {\n return {\n ...metric(size),\n headDiameter,\n headHeight,\n headCurvatureRadius,\n underHeadRadius,\n recesses: {\n H: {number, width, diameter: hDiameter, depth: hDepth},\n Z: {number, width, diameter: zDiameter, depth: zDepth},\n },\n };\n}\nexport const specifications = {\n M3: specification('M3', 5.6, 2.4, 5, 0.1, 1, 0.97, 3, 1.4, 2.8, 1.5),\n M4: specification('M4', 8, 3.1, 6.5, 0.2, 2, 1.47, 4.4, 1.9, 4.3, 1.89),\n M5: specification('M5', 9.5, 3.7, 8, 0.2, 2, 1.47, 4.9, 2.4, 4.7, 2.29),\n M6: specification('M6', 12, 4.6, 10, 0.25, 3, 2.41, 6.9, 3.1, 6.7, 3.03),\n M8: specification('M8', 16, 6, 13, 0.4, 4, 3.48, 9, 4, 8.8, 4.05),\n M10: specification('M10', 20, 7.5, 16, 0.4, 4, 3.48, 10.1, 5.2, 9.9, 5.24),\n} as const;\nexport type Size = keyof typeof specifications;\nexport type ScrewInput = Size | Specification;\nexport function resolveSpecification(input: ScrewInput): Specification {\n return typeof input === 'string' ? specifications[input] : input;\n}\n/** ISO minimum b; shorter screws are threaded to the head transition. */\nexport function threadLength(spec: Specification, _length: number): number {\n return spec.nominalDiameter <= 3 ? 25 : 38;\n}\n/**\n * @code3d.arguments ['M6', 18]\n * @code3d.param length {kind: 'length'}\n */\nexport function screw(\n input: ScrewInput,\n length: number,\n options: ScrewOptions = {},\n): Screw {\n const spec = resolveSpecification(input);\n validateHead(spec);\n const type = options.recess ?? 'H';\n if (type !== 'H' && type !== 'Z')\n throw new Error('Cross recess type must be H or Z.');\n const recess = spec.recesses[type];\n if (recess.depth >= spec.headHeight || recess.width >= recess.diameter)\n throw new Error('Cross recess must fit inside the head.');\n const blank = panHead(\n spec.headDiameter,\n spec.headHeight,\n recess.diameter * 1.05,\n spec.headCurvatureRadius,\n );\n return headedScrew(\n crossSocket(blank, recess, type),\n spec,\n length,\n threadLength(spec, length),\n );\n}\n/** @code3d.arguments ['M6', 10] */\nexport function clearanceHole(input: ScrewInput, depth: number): ClearanceHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: PlainHoleOptions,\n): ClearanceHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: CounterboredHoleOptions,\n): CounterboredHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: ClearanceHoleOptions,\n): ClearanceHole | CounterboredHole;\nexport function clearanceHole(\n input: ScrewInput,\n options: number | ClearanceHoleOptions,\n): ClearanceHole | CounterboredHole {\n return buildClearanceHole(resolveSpecification(input), options);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,uBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AA0CA,SAAS,cACP,MACA,cACA,YACA,qBACA,iBACA,QACA,OACA,WACA,QACA,WACA,QACe;AACf,SAAO;AAAA,IACL,GAAG,OAAO,IAAI;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,MACR,GAAG,EAAC,QAAQ,OAAO,UAAU,WAAW,OAAO,OAAM;AAAA,MACrD,GAAG,EAAC,QAAQ,OAAO,UAAU,WAAW,OAAO,OAAM;AAAA,IACvD;AAAA,EACF;AACF;AAxBS;AAyBF,IAAM,iBAAiB;AAAA,EAC5B,IAAI,cAAc,MAAM,KAAK,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,KAAK,GAAG;AAAA,EACnE,IAAI,cAAc,MAAM,GAAG,KAAK,KAAK,KAAK,GAAG,MAAM,KAAK,KAAK,KAAK,IAAI;AAAA,EACtE,IAAI,cAAc,MAAM,KAAK,KAAK,GAAG,KAAK,GAAG,MAAM,KAAK,KAAK,KAAK,IAAI;AAAA,EACtE,IAAI,cAAc,MAAM,IAAI,KAAK,IAAI,MAAM,GAAG,MAAM,KAAK,KAAK,KAAK,IAAI;AAAA,EACvE,IAAI,cAAc,MAAM,IAAI,GAAG,IAAI,KAAK,GAAG,MAAM,GAAG,GAAG,KAAK,IAAI;AAAA,EAChE,KAAK,cAAc,OAAO,IAAI,KAAK,IAAI,KAAK,GAAG,MAAM,MAAM,KAAK,KAAK,IAAI;AAC3E;AAGO,SAAS,qBAAqB,OAAkC;AACrE,SAAO,OAAO,UAAU,WAAW,eAAe,KAAK,IAAI;AAC7D;AAFgB;AAIT,SAAS,aAAa,MAAqB,SAAyB;AACzE,SAAO,KAAK,mBAAmB,IAAI,KAAK;AAC1C;AAFgB;AAOT,SAAS,MACd,OACA,QACA,UAAwB,CAAC,GAClB;AACP,QAAM,OAAO,qBAAqB,KAAK;AACvC,eAAa,IAAI;AACjB,QAAM,OAAO,QAAQ,UAAU;AAC/B,MAAI,SAAS,OAAO,SAAS;AAC3B,UAAM,IAAI,MAAM,mCAAmC;AACrD,QAAM,SAAS,KAAK,SAAS,IAAI;AACjC,MAAI,OAAO,SAAS,KAAK,cAAc,OAAO,SAAS,OAAO;AAC5D,UAAM,IAAI,MAAM,wCAAwC;AAC1D,QAAM,QAAQ;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO,WAAW;AAAA,IAClB,KAAK;AAAA,EACP;AACA,SAAO;AAAA,IACL,YAAY,OAAO,QAAQ,IAAI;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,aAAa,MAAM,MAAM;AAAA,EAC3B;AACF;AAzBgB;AAwCT,SAASC,eACd,OACA,SACkC;AAClC,SAAO,cAAmB,qBAAqB,KAAK,GAAG,OAAO;AAChE;AALgB,OAAAA,gBAAA;",
6
+ "names": ["clearanceHole", "clearanceHole"]
7
+ }
@@ -0,0 +1,27 @@
1
+ import {
2
+ clearanceHole,
3
+ resolveSpecification,
4
+ screw,
5
+ threadLength
6
+ } from "./chunk-P3M5KQ5U.js";
7
+ import {
8
+ specifications
9
+ } from "./chunk-GIIOR3XJ.js";
10
+ import {
11
+ __export
12
+ } from "./chunk-Z5LEGL77.js";
13
+
14
+ // packages/screws/src/library/gb-5783.ts
15
+ var gb_5783_exports = {};
16
+ __export(gb_5783_exports, {
17
+ clearanceHole: () => clearanceHole,
18
+ resolveSpecification: () => resolveSpecification,
19
+ screw: () => screw,
20
+ specifications: () => specifications,
21
+ threadLength: () => threadLength
22
+ });
23
+
24
+ export {
25
+ gb_5783_exports
26
+ };
27
+ //# sourceMappingURL=chunk-DKS4VANI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/library/gb-5783.ts"],
4
+ "sourcesContent": ["/**\n * GB/T 5783-2025 (MOD ISO 4017:2022).\n * Shares the corresponding ISO module's nominal geometry within our preset\n * range. See the package README for sizes, hole allowances and modeling limits.\n * https://std.samr.gov.cn/gb/search/gbDetailed?id=42BA7D06A331E936E06397BE0A0ACDC9\n */\nexport * from './iso-4017.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,21 @@
1
+ import {
2
+ resolveSpecification,
3
+ screw,
4
+ specifications
5
+ } from "./chunk-O34BMYJV.js";
6
+ import {
7
+ __export
8
+ } from "./chunk-Z5LEGL77.js";
9
+
10
+ // packages/screws/src/library/gb-80.ts
11
+ var gb_80_exports = {};
12
+ __export(gb_80_exports, {
13
+ resolveSpecification: () => resolveSpecification,
14
+ screw: () => screw,
15
+ specifications: () => specifications
16
+ });
17
+
18
+ export {
19
+ gb_80_exports
20
+ };
21
+ //# sourceMappingURL=chunk-ES62SR3Q.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/library/gb-80.ts"],
4
+ "sourcesContent": ["/**\n * GB/T 80-2007 (MOD ISO 4029:2003).\n * Shares the corresponding ISO module's nominal geometry within our preset\n * range. See the package README for sizes, hole allowances and modeling limits.\n * https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D7890DD3A7E05397BE0A0AB82A\n */\nexport * from './iso-4029.js';\n"],
5
+ "mappings": ";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,25 @@
1
+ import {
2
+ clearanceHole,
3
+ resolveSpecification,
4
+ screw,
5
+ specifications,
6
+ threadLength
7
+ } from "./chunk-7UGU5EFV.js";
8
+ import {
9
+ __export
10
+ } from "./chunk-Z5LEGL77.js";
11
+
12
+ // packages/screws/src/library/gb-818.ts
13
+ var gb_818_exports = {};
14
+ __export(gb_818_exports, {
15
+ clearanceHole: () => clearanceHole,
16
+ resolveSpecification: () => resolveSpecification,
17
+ screw: () => screw,
18
+ specifications: () => specifications,
19
+ threadLength: () => threadLength
20
+ });
21
+
22
+ export {
23
+ gb_818_exports
24
+ };
25
+ //# sourceMappingURL=chunk-ESLSQKZW.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/library/gb-818.ts"],
4
+ "sourcesContent": ["/**\n * GB/T 818-2016 (MOD ISO 7045:2011).\n * Shares the corresponding ISO module's nominal geometry within our preset\n * range. See the package README for sizes, hole allowances and modeling limits.\n * https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D813A1D3A7E05397BE0A0AB82A\n */\nexport * from './iso-7045.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }