@coloopx/colocad 0.0.0-stage → 0.1.0-alpha.2

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 (179) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +5 -0
  3. package/README.md +53 -2
  4. package/bin/colocad.mjs +32 -0
  5. package/examples/manifold.json +11 -0
  6. package/examples/sensor-rail.json +9 -0
  7. package/kernel/LICENSE +21 -0
  8. package/kernel/dist/artifacts.d.ts +3 -0
  9. package/kernel/dist/artifacts.js +19 -0
  10. package/kernel/dist/assets.d.ts +3 -0
  11. package/kernel/dist/assets.js +11 -0
  12. package/kernel/dist/binary.d.ts +2 -0
  13. package/kernel/dist/binary.js +14 -0
  14. package/kernel/dist/client.d.ts +22 -0
  15. package/kernel/dist/client.js +99 -0
  16. package/kernel/dist/files.d.ts +19 -0
  17. package/kernel/dist/files.js +103 -0
  18. package/kernel/dist/generated.d.ts +707 -0
  19. package/kernel/dist/generated.js +1 -0
  20. package/kernel/dist/helpers.d.ts +9 -0
  21. package/kernel/dist/helpers.js +23 -0
  22. package/kernel/dist/index.d.ts +8 -0
  23. package/kernel/dist/index.js +6 -0
  24. package/kernel/dist/preview-cache.d.ts +19 -0
  25. package/kernel/dist/preview-cache.js +29 -0
  26. package/kernel/dist/process.d.ts +12 -0
  27. package/kernel/dist/process.js +41 -0
  28. package/kernel/dist/tools.d.ts +67 -0
  29. package/kernel/dist/tools.js +20 -0
  30. package/kernel/dist/types.d.ts +26 -0
  31. package/kernel/dist/types.js +1 -0
  32. package/kernel/licenses/adler2-2.0.1-LICENSE-0BSD +12 -0
  33. package/kernel/licenses/adler2-2.0.1-LICENSE-APACHE +201 -0
  34. package/kernel/licenses/adler2-2.0.1-LICENSE-MIT +23 -0
  35. package/kernel/licenses/allocator-api2-0.2.21-LICENSE-APACHE +176 -0
  36. package/kernel/licenses/allocator-api2-0.2.21-LICENSE-MIT +23 -0
  37. package/kernel/licenses/autocfg-1.5.1-LICENSE-APACHE +201 -0
  38. package/kernel/licenses/autocfg-1.5.1-LICENSE-MIT +25 -0
  39. package/kernel/licenses/bitflags-1.3.2-LICENSE-APACHE +201 -0
  40. package/kernel/licenses/bitflags-1.3.2-LICENSE-MIT +25 -0
  41. package/kernel/licenses/block-buffer-0.10.4-LICENSE-APACHE +201 -0
  42. package/kernel/licenses/block-buffer-0.10.4-LICENSE-MIT +25 -0
  43. package/kernel/licenses/cfg-if-1.0.5-LICENSE-APACHE +201 -0
  44. package/kernel/licenses/cfg-if-1.0.5-LICENSE-MIT +25 -0
  45. package/kernel/licenses/cpufeatures-0.2.17-LICENSE-APACHE +201 -0
  46. package/kernel/licenses/cpufeatures-0.2.17-LICENSE-MIT +25 -0
  47. package/kernel/licenses/crc32fast-1.5.4-LICENSE-APACHE +202 -0
  48. package/kernel/licenses/crc32fast-1.5.4-LICENSE-MIT +21 -0
  49. package/kernel/licenses/crossbeam-deque-0.8.8-LICENSE-APACHE +201 -0
  50. package/kernel/licenses/crossbeam-deque-0.8.8-LICENSE-MIT +27 -0
  51. package/kernel/licenses/crossbeam-epoch-0.9.21-LICENSE-APACHE +201 -0
  52. package/kernel/licenses/crossbeam-epoch-0.9.21-LICENSE-MIT +27 -0
  53. package/kernel/licenses/crossbeam-utils-0.8.23-LICENSE-APACHE +201 -0
  54. package/kernel/licenses/crossbeam-utils-0.8.23-LICENSE-MIT +27 -0
  55. package/kernel/licenses/crypto-common-0.1.7-LICENSE-APACHE +201 -0
  56. package/kernel/licenses/crypto-common-0.1.7-LICENSE-MIT +25 -0
  57. package/kernel/licenses/dependencies.json +618 -0
  58. package/kernel/licenses/digest-0.10.7-LICENSE-APACHE +201 -0
  59. package/kernel/licenses/digest-0.10.7-LICENSE-MIT +25 -0
  60. package/kernel/licenses/dyn-clone-1.0.20-LICENSE-APACHE +176 -0
  61. package/kernel/licenses/dyn-clone-1.0.20-LICENSE-MIT +23 -0
  62. package/kernel/licenses/either-1.19.0-LICENSE-APACHE +201 -0
  63. package/kernel/licenses/either-1.19.0-LICENSE-MIT +25 -0
  64. package/kernel/licenses/equivalent-1.0.3-LICENSE-APACHE +201 -0
  65. package/kernel/licenses/equivalent-1.0.3-LICENSE-MIT +25 -0
  66. package/kernel/licenses/fdeflate-0.3.7-LICENSE-APACHE +177 -0
  67. package/kernel/licenses/fdeflate-0.3.7-LICENSE-MIT +25 -0
  68. package/kernel/licenses/flate2-1.1.10-LICENSE-APACHE +201 -0
  69. package/kernel/licenses/flate2-1.1.10-LICENSE-MIT +25 -0
  70. package/kernel/licenses/foldhash-0.2.0-LICENSE +19 -0
  71. package/kernel/licenses/generic-array-0.14.7-LICENSE +21 -0
  72. package/kernel/licenses/hashbrown-0.16.1-LICENSE-APACHE +201 -0
  73. package/kernel/licenses/hashbrown-0.16.1-LICENSE-MIT +25 -0
  74. package/kernel/licenses/itoa-1.0.18-LICENSE-APACHE +176 -0
  75. package/kernel/licenses/itoa-1.0.18-LICENSE-MIT +23 -0
  76. package/kernel/licenses/libc-0.2.191-LICENSE-APACHE +176 -0
  77. package/kernel/licenses/libc-0.2.191-LICENSE-MIT +25 -0
  78. package/kernel/licenses/memchr-2.8.3-COPYING +3 -0
  79. package/kernel/licenses/memchr-2.8.3-LICENSE-MIT +21 -0
  80. package/kernel/licenses/miniz_oxide-0.8.9-LICENSE +25 -0
  81. package/kernel/licenses/miniz_oxide-0.8.9-LICENSE-APACHE.md +177 -0
  82. package/kernel/licenses/miniz_oxide-0.8.9-LICENSE-MIT.md +24 -0
  83. package/kernel/licenses/miniz_oxide-0.8.9-LICENSE-ZLIB.md +14 -0
  84. package/kernel/licenses/miniz_oxide-0.9.1-LICENSE +25 -0
  85. package/kernel/licenses/miniz_oxide-0.9.1-LICENSE-APACHE.md +177 -0
  86. package/kernel/licenses/miniz_oxide-0.9.1-LICENSE-MIT.md +24 -0
  87. package/kernel/licenses/miniz_oxide-0.9.1-LICENSE-ZLIB.md +14 -0
  88. package/kernel/licenses/num-traits-0.2.19-LICENSE-APACHE +201 -0
  89. package/kernel/licenses/num-traits-0.2.19-LICENSE-MIT +25 -0
  90. package/kernel/licenses/png-0.17.16-LICENSE-APACHE +201 -0
  91. package/kernel/licenses/png-0.17.16-LICENSE-MIT +25 -0
  92. package/kernel/licenses/proc-macro2-1.0.107-LICENSE-APACHE +176 -0
  93. package/kernel/licenses/proc-macro2-1.0.107-LICENSE-MIT +23 -0
  94. package/kernel/licenses/quote-1.0.47-LICENSE-APACHE +176 -0
  95. package/kernel/licenses/quote-1.0.47-LICENSE-MIT +23 -0
  96. package/kernel/licenses/rayon-1.12.0-LICENSE-APACHE +201 -0
  97. package/kernel/licenses/rayon-1.12.0-LICENSE-MIT +25 -0
  98. package/kernel/licenses/rayon-core-1.13.0-LICENSE-APACHE +201 -0
  99. package/kernel/licenses/rayon-core-1.13.0-LICENSE-MIT +25 -0
  100. package/kernel/licenses/ref-cast-1.0.27-LICENSE-APACHE +176 -0
  101. package/kernel/licenses/ref-cast-1.0.27-LICENSE-MIT +23 -0
  102. package/kernel/licenses/ref-cast-impl-1.0.27-LICENSE-APACHE +176 -0
  103. package/kernel/licenses/ref-cast-impl-1.0.27-LICENSE-MIT +23 -0
  104. package/kernel/licenses/robust-1.2.0-LICENSE-APACHE +201 -0
  105. package/kernel/licenses/robust-1.2.0-LICENSE-MIT +26 -0
  106. package/kernel/licenses/schemars-1.2.3-LICENSE +21 -0
  107. package/kernel/licenses/schemars_derive-1.2.3-LICENSE +21 -0
  108. package/kernel/licenses/serde-1.0.229-LICENSE-APACHE +176 -0
  109. package/kernel/licenses/serde-1.0.229-LICENSE-MIT +23 -0
  110. package/kernel/licenses/serde_core-1.0.229-LICENSE-APACHE +176 -0
  111. package/kernel/licenses/serde_core-1.0.229-LICENSE-MIT +23 -0
  112. package/kernel/licenses/serde_derive-1.0.229-LICENSE-APACHE +176 -0
  113. package/kernel/licenses/serde_derive-1.0.229-LICENSE-MIT +23 -0
  114. package/kernel/licenses/serde_derive_internals-0.30.0-LICENSE-APACHE +176 -0
  115. package/kernel/licenses/serde_derive_internals-0.30.0-LICENSE-MIT +23 -0
  116. package/kernel/licenses/serde_json-1.0.154-LICENSE-APACHE +176 -0
  117. package/kernel/licenses/serde_json-1.0.154-LICENSE-MIT +23 -0
  118. package/kernel/licenses/sha2-0.10.9-LICENSE-APACHE +201 -0
  119. package/kernel/licenses/sha2-0.10.9-LICENSE-MIT +27 -0
  120. package/kernel/licenses/simd-adler32-0.3.10-LICENSE.md +21 -0
  121. package/kernel/licenses/smallvec-1.16.4-LICENSE-APACHE +201 -0
  122. package/kernel/licenses/smallvec-1.16.4-LICENSE-MIT +25 -0
  123. package/kernel/licenses/solidcore-1.0.1-LICENSE +203 -0
  124. package/kernel/licenses/solidcore-1.0.1-NOTICE +30 -0
  125. package/kernel/licenses/solidcore-ATTRIBUTION.md +92 -0
  126. package/kernel/licenses/solidcore-LICENSE +203 -0
  127. package/kernel/licenses/solidcore-NOTICE +30 -0
  128. package/kernel/licenses/solidcore-convert-0.1.0-ATTRIBUTION.md +92 -0
  129. package/kernel/licenses/solidcore-convert-0.1.0-LICENSE +203 -0
  130. package/kernel/licenses/solidcore-convert-0.1.0-NOTICE +30 -0
  131. package/kernel/licenses/solidcore-record-0.1.0-ATTRIBUTION.md +92 -0
  132. package/kernel/licenses/solidcore-record-0.1.0-LICENSE +203 -0
  133. package/kernel/licenses/solidcore-record-0.1.0-NOTICE +30 -0
  134. package/kernel/licenses/solidcore-tess-0.1.0-ATTRIBUTION.md +92 -0
  135. package/kernel/licenses/solidcore-tess-0.1.0-LICENSE +203 -0
  136. package/kernel/licenses/solidcore-tess-0.1.0-NOTICE +30 -0
  137. package/kernel/licenses/spade-2.15.1-LICENSE-APACHE +202 -0
  138. package/kernel/licenses/spade-2.15.1-LICENSE-MIT +25 -0
  139. package/kernel/licenses/step-brep-0.1.0-ATTRIBUTION.md +92 -0
  140. package/kernel/licenses/step-brep-0.1.0-LICENSE +203 -0
  141. package/kernel/licenses/step-brep-0.1.0-NOTICE +30 -0
  142. package/kernel/licenses/step-export-0.1.0-ATTRIBUTION.md +92 -0
  143. package/kernel/licenses/step-export-0.1.0-LICENSE +203 -0
  144. package/kernel/licenses/step-export-0.1.0-NOTICE +30 -0
  145. package/kernel/licenses/step-import-0.1.0-ATTRIBUTION.md +92 -0
  146. package/kernel/licenses/step-import-0.1.0-LICENSE +203 -0
  147. package/kernel/licenses/step-import-0.1.0-NOTICE +30 -0
  148. package/kernel/licenses/syn-3.0.9-LICENSE-APACHE +176 -0
  149. package/kernel/licenses/syn-3.0.9-LICENSE-MIT +23 -0
  150. package/kernel/licenses/thiserror-2.0.21-LICENSE-APACHE +176 -0
  151. package/kernel/licenses/thiserror-2.0.21-LICENSE-MIT +23 -0
  152. package/kernel/licenses/thiserror-impl-2.0.21-LICENSE-APACHE +176 -0
  153. package/kernel/licenses/thiserror-impl-2.0.21-LICENSE-MIT +23 -0
  154. package/kernel/licenses/typenum-1.20.1-LICENSE +1 -0
  155. package/kernel/licenses/typenum-1.20.1-LICENSE-APACHE +201 -0
  156. package/kernel/licenses/typenum-1.20.1-LICENSE-MIT +21 -0
  157. package/kernel/licenses/unicode-ident-1.0.27-LICENSE-APACHE +176 -0
  158. package/kernel/licenses/unicode-ident-1.0.27-LICENSE-MIT +23 -0
  159. package/kernel/licenses/unicode-ident-1.0.27-LICENSE-UNICODE +39 -0
  160. package/kernel/licenses/version_check-0.9.5-LICENSE-APACHE +201 -0
  161. package/kernel/licenses/version_check-0.9.5-LICENSE-MIT +19 -0
  162. package/kernel/licenses/zlib-rs-0.6.8-LICENSE +19 -0
  163. package/kernel/licenses/zmij-1.0.23-LICENSE-MIT +23 -0
  164. package/kernel/native/darwin-arm64/agent-cad +4 -0
  165. package/kernel/native/darwin-arm64/manifest.json +6 -0
  166. package/kernel/native/linux-arm64/agent-cad +4 -0
  167. package/kernel/native/linux-arm64/manifest.json +6 -0
  168. package/kernel/native/linux-x64/agent-cad +4 -0
  169. package/kernel/native/linux-x64/manifest.json +6 -0
  170. package/kernel/schemas/model.schema.json +4080 -0
  171. package/package.json +54 -4
  172. package/solidworks/managed/Colocad.SolidWorks.deps.json +23 -0
  173. package/solidworks/managed/Colocad.SolidWorks.dll +0 -0
  174. package/solidworks/managed/Colocad.SolidWorks.runtimeconfig.json +13 -0
  175. package/src/build.mjs +69 -0
  176. package/src/index.d.mts +67 -0
  177. package/src/index.mjs +4 -0
  178. package/src/solidworks.mjs +65 -0
  179. package/src/tree.mjs +199 -0
@@ -0,0 +1,707 @@
1
+ export type Arithmetic = "add" | "sub" | "mul" | "div";
2
+ export type AssemblyCheck = ({
3
+ "allowed_pairs"?: Array<[string, string]>;
4
+ "kind": "collision";
5
+ "max_overlap_mm3": Scalar;
6
+ "parts": Array<string>;
7
+ }) | ({
8
+ "kind": "opening";
9
+ "max_distance_mm": Scalar;
10
+ "min_overlap_mm3": Scalar;
11
+ "opening": string;
12
+ "target": string;
13
+ }) | ({
14
+ "container": string;
15
+ "kind": "containment";
16
+ "max_outside_mm3": Scalar;
17
+ "targets": Array<string>;
18
+ });
19
+ export type Attachment = {
20
+ "frame"?: Frame;
21
+ "instance": string;
22
+ };
23
+ export type Axis = "x" | "y" | "z";
24
+ export type Boundary = ({
25
+ "kind": "polygon";
26
+ "points": Array<string>;
27
+ }) | ({
28
+ "kind": "outline";
29
+ "segments": Array<SketchSegment>;
30
+ "start": string;
31
+ }) | ({
32
+ "circle": string;
33
+ "kind": "circle";
34
+ });
35
+ export type BoxFace = "pos_x" | "neg_x" | "pos_y" | "neg_y" | "pos_z" | "neg_z";
36
+ export type Circle = {
37
+ "center": string;
38
+ "radius": Scalar;
39
+ };
40
+ export type Constraint = ({
41
+ "at": [Scalar, Scalar];
42
+ "id": string;
43
+ "kind": "fixed";
44
+ "point": string;
45
+ }) | ({
46
+ "a": string;
47
+ "b": string;
48
+ "id": string;
49
+ "kind": "coincident";
50
+ }) | ({
51
+ "a": string;
52
+ "b": string;
53
+ "id": string;
54
+ "kind": "horizontal";
55
+ }) | ({
56
+ "a": string;
57
+ "b": string;
58
+ "id": string;
59
+ "kind": "vertical";
60
+ }) | ({
61
+ "a": string;
62
+ "b": string;
63
+ "id": string;
64
+ "kind": "distance";
65
+ "value": Scalar;
66
+ }) | ({
67
+ "a": string;
68
+ "b": string;
69
+ "id": string;
70
+ "kind": "dx";
71
+ "value": Scalar;
72
+ }) | ({
73
+ "a": string;
74
+ "b": string;
75
+ "id": string;
76
+ "kind": "dy";
77
+ "value": Scalar;
78
+ }) | ({
79
+ "id": string;
80
+ "kind": "parallel";
81
+ "line_a": [string, string];
82
+ "line_b": [string, string];
83
+ }) | ({
84
+ "id": string;
85
+ "kind": "perpendicular";
86
+ "line_a": [string, string];
87
+ "line_b": [string, string];
88
+ }) | ({
89
+ "degrees": Scalar;
90
+ "id": string;
91
+ "kind": "angle";
92
+ "line_a": [string, string];
93
+ "line_b": [string, string];
94
+ }) | ({
95
+ "id": string;
96
+ "kind": "equal_length";
97
+ "line_a": [string, string];
98
+ "line_b": [string, string];
99
+ }) | ({
100
+ "id": string;
101
+ "kind": "midpoint";
102
+ "line": [string, string];
103
+ "point": string;
104
+ }) | ({
105
+ "id": string;
106
+ "kind": "point_on_line";
107
+ "line": [string, string];
108
+ "point": string;
109
+ }) | ({
110
+ "circle": string;
111
+ "id": string;
112
+ "kind": "radius";
113
+ "value": Scalar;
114
+ }) | ({
115
+ "a": string;
116
+ "b": string;
117
+ "id": string;
118
+ "kind": "equal_radius";
119
+ }) | ({
120
+ "circle": string;
121
+ "id": string;
122
+ "kind": "point_on_circle";
123
+ "point": string;
124
+ }) | ({
125
+ "circle": string;
126
+ "id": string;
127
+ "kind": "tangent";
128
+ "line": [string, string];
129
+ }) | ({
130
+ "a": string;
131
+ "b": string;
132
+ "id": string;
133
+ "internal"?: boolean;
134
+ "kind": "circle_tangent";
135
+ }) | ({
136
+ "a": string;
137
+ "axis": [string, string];
138
+ "b": string;
139
+ "id": string;
140
+ "kind": "symmetric";
141
+ });
142
+ export type ControlEdit = {
143
+ "point": [Scalar, Scalar, Scalar];
144
+ "u": number;
145
+ "v": number;
146
+ };
147
+ export type Counterbore = {
148
+ "depth": Scalar;
149
+ "radius": Scalar;
150
+ };
151
+ export type EdgeSelector = ({
152
+ "expected_count": number;
153
+ "kind": "named";
154
+ "name": string;
155
+ }) | ({
156
+ "expected_count": number;
157
+ "kind": "outer";
158
+ "region": OuterEdges;
159
+ "tolerance": Scalar;
160
+ }) | ({
161
+ "kind": "all";
162
+ }) | ({
163
+ "axis": [Scalar, Scalar, Scalar];
164
+ "expected_count": number;
165
+ "kind": "parallel";
166
+ }) | ({
167
+ "axis": Axis;
168
+ "expected_count": number;
169
+ "kind": "on_plane";
170
+ "tolerance": Scalar;
171
+ "value": Scalar;
172
+ }) | ({
173
+ "kind": "near";
174
+ "points": Array<[Scalar, Scalar, Scalar]>;
175
+ "tolerance": Scalar;
176
+ });
177
+ export type Expression = {
178
+ "a": Scalar;
179
+ "b": Scalar;
180
+ "op": Arithmetic;
181
+ };
182
+ export type FaceSelector = ({
183
+ "expected_count": number;
184
+ "name": string;
185
+ }) | ({
186
+ "axis": Axis;
187
+ "expected_count": number;
188
+ "tolerance": Scalar;
189
+ "value": Scalar;
190
+ });
191
+ export type Feature = ({
192
+ "angle_deg": Scalar;
193
+ "frame"?: Frame;
194
+ "height": Scalar;
195
+ "id": string;
196
+ "op": "draft_extrude";
197
+ "profile": Profile;
198
+ }) | ({
199
+ "edges"?: {
200
+ [key: string]: EdgeSelector;
201
+ };
202
+ "faces"?: {
203
+ [key: string]: FaceSelector;
204
+ };
205
+ "id": string;
206
+ "input": string;
207
+ "op": "name_topology";
208
+ }) | ({
209
+ "id": string;
210
+ "op": "surface_network";
211
+ "u_curves": Array<Array<[Scalar, Scalar, Scalar]>>;
212
+ "u_stations": Array<number>;
213
+ "v_curves": Array<Array<[Scalar, Scalar, Scalar]>>;
214
+ "v_stations": Array<number>;
215
+ }) | ({
216
+ "control_points": Array<Array<[Scalar, Scalar, Scalar]>>;
217
+ "id": string;
218
+ "op": "surface_patch";
219
+ }) | ({
220
+ "end": string;
221
+ "end_scale": Scalar;
222
+ "id": string;
223
+ "op": "surface_bridge";
224
+ "start": string;
225
+ "start_scale": Scalar;
226
+ }) | ({
227
+ "edits": Array<ControlEdit>;
228
+ "id": string;
229
+ "input": string;
230
+ "op": "surface_edit";
231
+ }) | ({
232
+ "id": string;
233
+ "input": string;
234
+ "op": "thicken";
235
+ "thickness": Scalar;
236
+ }) | ({
237
+ "id": string;
238
+ "inputs": Array<string>;
239
+ "op": "sew";
240
+ }) | ({
241
+ "id": string;
242
+ "index"?: number;
243
+ "input": string;
244
+ "op": "inspection_region";
245
+ "region": RegionKind;
246
+ "require_exact"?: boolean;
247
+ }) | ({
248
+ "cavity_strategy"?: Strategy;
249
+ "id": string;
250
+ "input": string;
251
+ "op": "hollow";
252
+ "wall": Scalar;
253
+ }) | ({
254
+ "edge_radius"?: Scalar;
255
+ "floor": Scalar;
256
+ "frame"?: Frame;
257
+ "height": Scalar;
258
+ "id": string;
259
+ "op": "shell_body";
260
+ "open_face": OpenFace;
261
+ "profile": Profile;
262
+ "wall": Scalar;
263
+ }) | ({
264
+ "clearance": Scalar;
265
+ "frame"?: Frame;
266
+ "id": string;
267
+ "lip_height": Scalar;
268
+ "op": "lid_for";
269
+ "profile": Profile;
270
+ "thickness": Scalar;
271
+ "wall": Scalar;
272
+ }) | ({
273
+ "center": [Scalar, Scalar];
274
+ "depth": Scalar;
275
+ "face": BoxFace;
276
+ "id": string;
277
+ "input": string;
278
+ "op": "face_cutout";
279
+ "profile": Profile;
280
+ }) | ({
281
+ "center": [Scalar, Scalar];
282
+ "count": [Scalar, Scalar];
283
+ "counterbore"?: (Counterbore) | (null);
284
+ "depth": Scalar;
285
+ "face": BoxFace;
286
+ "id": string;
287
+ "input": string;
288
+ "op": "face_hole_grid";
289
+ "radius": Scalar;
290
+ "spacing": [Scalar, Scalar];
291
+ }) | ({
292
+ "center": [Scalar, Scalar];
293
+ "depth": Scalar;
294
+ "face": BoxFace;
295
+ "id": string;
296
+ "input": string;
297
+ "op": "face_tool";
298
+ "profile": Profile;
299
+ }) | ({
300
+ "counterbore"?: (Counterbore) | (null);
301
+ "depth": Scalar;
302
+ "face": BoxFace;
303
+ "id": string;
304
+ "input": string;
305
+ "op": "face_holes";
306
+ "positions": Array<[Scalar, Scalar]>;
307
+ "radius": Scalar;
308
+ }) | ({
309
+ "depth": Scalar;
310
+ "frame": Frame;
311
+ "id": string;
312
+ "input": string;
313
+ "op": "cutout";
314
+ "profile": Profile;
315
+ }) | ({
316
+ "counterbore"?: (Counterbore) | (null);
317
+ "depth": Scalar;
318
+ "frame": Frame;
319
+ "id": string;
320
+ "input": string;
321
+ "op": "holes";
322
+ "positions": Array<[Scalar, Scalar]>;
323
+ "radius": Scalar;
324
+ }) | ({
325
+ "axis": Axis;
326
+ "id": string;
327
+ "input": string;
328
+ "keep_positive": boolean;
329
+ "op": "split";
330
+ "value": Scalar;
331
+ }) | ({
332
+ "frame"?: Frame;
333
+ "height": Scalar;
334
+ "holes"?: Array<Profile>;
335
+ "id": string;
336
+ "op": "extrude";
337
+ "profile": Profile;
338
+ }) | ({
339
+ "angle_deg": Scalar;
340
+ "axis": [Scalar, Scalar, Scalar];
341
+ "axis_origin": [Scalar, Scalar, Scalar];
342
+ "frame"?: Frame;
343
+ "id": string;
344
+ "op": "revolve";
345
+ "profile": Profile;
346
+ }) | ({
347
+ "frame": Frame;
348
+ "id": string;
349
+ "op": "sweep";
350
+ "path": Array<PathCurve>;
351
+ "profile": Profile;
352
+ }) | ({
353
+ "frame": Frame;
354
+ "id": string;
355
+ "op": "curve_sweep";
356
+ "path": PathCurve;
357
+ "profile": Profile;
358
+ "translational"?: boolean;
359
+ }) | ({
360
+ "id": string;
361
+ "op": "pipe";
362
+ "path": PathCurve;
363
+ "radius": Scalar;
364
+ }) | ({
365
+ "degree": number;
366
+ "id": string;
367
+ "op": "profile_loft";
368
+ "sections": Array<ProfileSection>;
369
+ }) | ({
370
+ "id": string;
371
+ "input": string;
372
+ "op": "place";
373
+ "rotation_deg": [Scalar, Scalar, Scalar];
374
+ "rotation_order"?: RotationOrder;
375
+ "translation": [Scalar, Scalar, Scalar];
376
+ }) | ({
377
+ "angle_deg": Scalar;
378
+ "axis": [Scalar, Scalar, Scalar];
379
+ "id": string;
380
+ "input": string;
381
+ "op": "rotate";
382
+ "origin": [Scalar, Scalar, Scalar];
383
+ }) | ({
384
+ "id": string;
385
+ "input": string;
386
+ "normal": [Scalar, Scalar, Scalar];
387
+ "op": "mirror";
388
+ "origin": [Scalar, Scalar, Scalar];
389
+ }) | ({
390
+ "id": string;
391
+ "input": string;
392
+ "on_fail"?: OnFailure;
393
+ "op": "fillet";
394
+ "radius": Scalar;
395
+ "select": EdgeSelector;
396
+ }) | ({
397
+ "id": string;
398
+ "input": string;
399
+ "length": Scalar;
400
+ "on_fail"?: OnFailure;
401
+ "op": "chamfer";
402
+ "select": EdgeSelector;
403
+ }) | ({
404
+ "id": string;
405
+ "input": string;
406
+ "op": "shell";
407
+ "open_faces"?: Array<FaceSelector>;
408
+ "thickness": Scalar;
409
+ }) | ({
410
+ "height": Scalar;
411
+ "hole_depth": Scalar;
412
+ "hole_radius": Scalar;
413
+ "id": string;
414
+ "op": "boss";
415
+ "origin": [Scalar, Scalar, Scalar];
416
+ "outer_radius": Scalar;
417
+ }) | ({
418
+ "id": string;
419
+ "input": string;
420
+ "op": "pattern";
421
+ "positions": Array<[Scalar, Scalar, Scalar]>;
422
+ }) | ({
423
+ "asset": string;
424
+ "frame_rotation_deg"?: [Scalar, Scalar, Scalar];
425
+ "id": string;
426
+ "op": "component_cad";
427
+ "size": [Scalar, Scalar, Scalar];
428
+ }) | ({
429
+ "assembly"?: boolean;
430
+ "asset": string;
431
+ "body_index"?: number;
432
+ "definition"?: boolean;
433
+ "id": string;
434
+ "op": "import_step";
435
+ }) | ({
436
+ "degree": number;
437
+ "id": string;
438
+ "op": "loft";
439
+ "sections": Array<LoftSection>;
440
+ }) | ({
441
+ "id": string;
442
+ "op": "box";
443
+ "origin": [Scalar, Scalar, Scalar];
444
+ "size": [Scalar, Scalar, Scalar];
445
+ }) | ({
446
+ "base_radius": Scalar;
447
+ "height": Scalar;
448
+ "id": string;
449
+ "op": "cone";
450
+ "origin": [Scalar, Scalar, Scalar];
451
+ "top_radius": Scalar;
452
+ }) | ({
453
+ "height": Scalar;
454
+ "id": string;
455
+ "op": "cylinder";
456
+ "origin": [Scalar, Scalar, Scalar];
457
+ "radius": Scalar;
458
+ }) | ({
459
+ "center": [Scalar, Scalar, Scalar];
460
+ "id": string;
461
+ "op": "sphere";
462
+ "radius": Scalar;
463
+ }) | ({
464
+ "id": string;
465
+ "left": string;
466
+ "op": "cut";
467
+ "right": string;
468
+ }) | ({
469
+ "id": string;
470
+ "left": string;
471
+ "op": "union";
472
+ "right": string;
473
+ }) | ({
474
+ "id": string;
475
+ "left": string;
476
+ "op": "intersect";
477
+ "right": string;
478
+ }) | ({
479
+ "id": string;
480
+ "input": string;
481
+ "offset": [Scalar, Scalar, Scalar];
482
+ "op": "translate";
483
+ }) | ({
484
+ "count": [Scalar, Scalar];
485
+ "depth": Scalar;
486
+ "id": string;
487
+ "input": string;
488
+ "op": "hole_grid";
489
+ "origin": [Scalar, Scalar, Scalar];
490
+ "radius": Scalar;
491
+ "spacing": [Scalar, Scalar];
492
+ });
493
+ export type Frame = {
494
+ "origin": [Scalar, Scalar, Scalar];
495
+ "x_axis": [Scalar, Scalar, Scalar];
496
+ "y_axis": [Scalar, Scalar, Scalar];
497
+ };
498
+ export type Group = {
499
+ "id": string;
500
+ "parent"?: string | null;
501
+ "pose"?: Pose;
502
+ };
503
+ export type Instance = {
504
+ "export"?: boolean;
505
+ "id": string;
506
+ "input": string;
507
+ "metadata"?: {
508
+ [key: string]: unknown;
509
+ };
510
+ "parent"?: string | null;
511
+ "poses"?: (Poses) | (null);
512
+ "representation"?: Representation;
513
+ "rotation_deg"?: [Scalar, Scalar, Scalar];
514
+ "rotation_order"?: RotationOrder;
515
+ "translation"?: [Scalar, Scalar, Scalar];
516
+ };
517
+ export type LoftSection = {
518
+ "center": [Scalar, Scalar, Scalar];
519
+ "radii": [Scalar, Scalar];
520
+ };
521
+ export type Mate = ({
522
+ "a": Attachment;
523
+ "b": Attachment;
524
+ "id": string;
525
+ "kind": "fixed";
526
+ }) | ({
527
+ "a": Attachment;
528
+ "b": Attachment;
529
+ "id": string;
530
+ "kind": "coincident";
531
+ }) | ({
532
+ "a": Attachment;
533
+ "b": Attachment;
534
+ "id": string;
535
+ "kind": "concentric";
536
+ }) | ({
537
+ "a": Attachment;
538
+ "b": Attachment;
539
+ "id": string;
540
+ "kind": "revolute";
541
+ }) | ({
542
+ "a": Attachment;
543
+ "b": Attachment;
544
+ "id": string;
545
+ "kind": "prismatic";
546
+ }) | ({
547
+ "a": Attachment;
548
+ "b": Attachment;
549
+ "distance": Scalar;
550
+ "id": string;
551
+ "kind": "plane";
552
+ "opposed"?: boolean;
553
+ }) | ({
554
+ "a": Attachment;
555
+ "b": Attachment;
556
+ "distance": Scalar;
557
+ "id": string;
558
+ "kind": "distance";
559
+ });
560
+ export type MateSystem = {
561
+ "anchors": Array<string>;
562
+ "constraints": Array<Mate>;
563
+ "expected_degrees_of_freedom"?: number;
564
+ };
565
+ export type OnFailure = ({
566
+ "kind": "raise";
567
+ }) | ({
568
+ "affects": Array<string>;
569
+ "kind": "record";
570
+ "omitted": Array<string>;
571
+ "reason": string;
572
+ });
573
+ export type OpenFace = "top" | "bottom";
574
+ export type OuterEdges = "vertical" | "top" | "bottom";
575
+ export type OutputKind = "solid" | "surface";
576
+ export type ParamRef = {
577
+ "param": string;
578
+ };
579
+ export type PathCurve = ({
580
+ "end": [Scalar, Scalar, Scalar];
581
+ "kind": "line";
582
+ "start": [Scalar, Scalar, Scalar];
583
+ }) | ({
584
+ "end": [Scalar, Scalar, Scalar];
585
+ "kind": "arc";
586
+ "start": [Scalar, Scalar, Scalar];
587
+ "via": [Scalar, Scalar, Scalar];
588
+ }) | ({
589
+ "control_points": Array<[Scalar, Scalar, Scalar]>;
590
+ "kind": "bezier";
591
+ });
592
+ export type Pose = {
593
+ "frame"?: (Frame) | (null);
594
+ "rotation_deg"?: [Scalar, Scalar, Scalar];
595
+ "rotation_order"?: RotationOrder;
596
+ "translation"?: [Scalar, Scalar, Scalar];
597
+ "visible"?: boolean;
598
+ };
599
+ export type PoseMode = "normal" | "internal" | "exploded";
600
+ export type Poses = {
601
+ "exploded": Pose;
602
+ "internal": Pose;
603
+ "normal": Pose;
604
+ };
605
+ export type PreviewOptions = {
606
+ "chord_mm"?: number;
607
+ "height"?: number;
608
+ "pose"?: PoseMode;
609
+ "section"?: (SectionPlane) | (null);
610
+ "view"?: View;
611
+ "width"?: number;
612
+ };
613
+ export type Profile = ({
614
+ "kind": "sketch";
615
+ "sketch": Sketch;
616
+ }) | ({
617
+ "depth": Scalar;
618
+ "kind": "rectangle";
619
+ "radius"?: Scalar;
620
+ "width": Scalar;
621
+ }) | ({
622
+ "kind": "circle";
623
+ "radius": Scalar;
624
+ }) | ({
625
+ "kind": "ellipse";
626
+ "radii": [Scalar, Scalar];
627
+ }) | ({
628
+ "kind": "polygon";
629
+ "points": Array<[Scalar, Scalar]>;
630
+ }) | ({
631
+ "kind": "outline";
632
+ "segments": Array<Segment>;
633
+ "start": [Scalar, Scalar];
634
+ });
635
+ export type ProfileSection = {
636
+ "frame"?: Frame;
637
+ "profile": Profile;
638
+ };
639
+ export type RegionKind = "outer" | "cavity" | "opening";
640
+ export type Representation = ({
641
+ "kind": "exact";
642
+ }) | ({
643
+ "kind": "envelope";
644
+ "reason": string;
645
+ }) | ({
646
+ "affects": Array<string>;
647
+ "kind": "simplified";
648
+ "omitted": Array<string>;
649
+ "reason": string;
650
+ });
651
+ export type RotationOrder = "xyz" | "zyx";
652
+ export type Scalar = (number) | (ParamRef) | (Expression);
653
+ export type SectionPlane = {
654
+ "normal": [number, number, number];
655
+ "offset_mm": number;
656
+ };
657
+ export type Segment = ({
658
+ "kind": "line";
659
+ "to": [Scalar, Scalar];
660
+ }) | ({
661
+ "kind": "arc";
662
+ "to": [Scalar, Scalar];
663
+ "via": [Scalar, Scalar];
664
+ });
665
+ export type Sketch = {
666
+ "allow_underconstrained"?: boolean;
667
+ "boundary": Boundary;
668
+ "circles"?: {
669
+ [key: string]: Circle;
670
+ };
671
+ "constraints": Array<Constraint>;
672
+ "points": {
673
+ [key: string]: [Scalar, Scalar];
674
+ };
675
+ };
676
+ export type SketchSegment = ({
677
+ "kind": "line";
678
+ "to": string;
679
+ }) | ({
680
+ "kind": "arc";
681
+ "to": string;
682
+ "via": string;
683
+ });
684
+ export type StepAsset = {
685
+ "sha256": string;
686
+ "step": string;
687
+ };
688
+ export type Strategy = "offset" | "scaled" | "offset_then_scaled";
689
+ export type View = "iso" | "front" | "back" | "left" | "right" | "top" | "bottom";
690
+ export type Model = {
691
+ "assembly"?: Array<Instance>;
692
+ "assets"?: {
693
+ [key: string]: StepAsset;
694
+ };
695
+ "checks"?: Array<AssemblyCheck>;
696
+ "features": Array<Feature>;
697
+ "groups"?: Array<Group>;
698
+ "mates"?: (MateSystem) | (null);
699
+ "output"?: string;
700
+ "output_kind"?: OutputKind;
701
+ "parameters": {
702
+ [key: string]: number;
703
+ };
704
+ "preview"?: (PreviewOptions) | (null);
705
+ "units": string;
706
+ "version": number;
707
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /** Typed ergonomic helpers for the host. Agent transport remains declarative JSON. */
2
+ import type { Feature, Instance, Pose, V3, Representation } from './types.js';
3
+ export type HardwareKind = 'compute-board' | 'accelerator' | 'display' | 'camera' | 'mic' | 'speaker' | 'box' | 'battery' | 'button' | 'coil' | 'connector';
4
+ export declare function pose(translation?: V3, rotation_deg?: V3, visible?: boolean): Pose;
5
+ export declare function occurrence(id: string, input: string, normal: Pose, internal?: Pose, exploded?: Pose, metadata?: Record<string, unknown>, representation?: Representation): Instance;
6
+ export declare function hardwareEnvelope(id: string, kind: HardwareKind, size: [number, number, number], shape?: 'box' | 'cylinder', axis?: 'x' | 'y' | 'z'): Feature[];
7
+ export declare function envelope(reason: string): Representation;
8
+ export declare function simplified(reason: string, omitted: string[], affects: string[]): Representation;
9
+ export declare function blindBoss(id: string, outerDiameter: number, height: number, holeDiameter: number, holeDepth: number): Feature;