brepjs 20.12.7 → 20.12.8

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 (94) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-mMmTBUBY.cjs → adjacencyFns-BfgFo-Rh.cjs} +3 -3
  4. package/dist/{adjacencyFns-hMihivxC.js → adjacencyFns-Bl109A3Z.js} +3 -3
  5. package/dist/{blueprint-17RUHsoP.cjs → blueprint-DTDSztfd.cjs} +5 -5
  6. package/dist/{blueprint-BS50D3J_.js → blueprint-RqemOtg5.js} +5 -5
  7. package/dist/{blueprintFns-zy5lo2IF.js → blueprintFns-B9_PhTr8.js} +2 -2
  8. package/dist/{blueprintFns-Dw5_4_Bk.cjs → blueprintFns-C7E5R89N.cjs} +2 -2
  9. package/dist/{blueprintSketcher-C1WCI6E0.js → blueprintSketcher-B15522Kr.js} +3 -3
  10. package/dist/{blueprintSketcher-BG--DxWB.cjs → blueprintSketcher-Brj4lXjj.cjs} +3 -3
  11. package/dist/{boolean2D-7SQ3B0pC.cjs → boolean2D-DZ8aJbI-.cjs} +4 -4
  12. package/dist/{boolean2D-CsdyfjFE.js → boolean2D-_eiIiNw1.js} +4 -4
  13. package/dist/{solidBuilders-DdG4NPHM.cjs → booleanFns-D5nQ1nWS.cjs} +11 -217
  14. package/dist/{solidBuilders-Bmr59cGp.js → booleanFns-cNfXGqMX.js} +10 -156
  15. package/dist/brepjs.cjs +325 -168
  16. package/dist/brepjs.js +282 -125
  17. package/dist/{cameraFns-BAtzhCYM.cjs → cameraFns-6Er2lhp5.cjs} +3 -3
  18. package/dist/{cameraFns-BVWyAscu.js → cameraFns-YhB7A_Zc.js} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-e4Wc7_yp.cjs → cornerFinder-D9Wx3DWu.cjs} +1 -1
  22. package/dist/{cornerFinder-Dv_2rmaY.js → cornerFinder-G1WkSkVl.js} +1 -1
  23. package/dist/{curveFns-BAM7QHrP.cjs → curveFns-B5_N-gMj.cjs} +1 -1
  24. package/dist/{curveFns-CEI-rouh.js → curveFns-C4CqthJp.js} +1 -1
  25. package/dist/{drawFns-Cl1i8B_B.js → drawFns-DU5fewKl.js} +12 -12
  26. package/dist/{drawFns-d-RvC6u6.cjs → drawFns-UPbO2heB.cjs} +12 -12
  27. package/dist/{faceFns-Q87HCJrp.js → faceFns-BgRNa5vx.js} +2 -2
  28. package/dist/{faceFns-C-2ttg8X.cjs → faceFns-C4NOGZBg.cjs} +2 -2
  29. package/dist/{healingFns-Cm4NkKD8.js → healingFns-BzOo0yyz.js} +5 -5
  30. package/dist/{healingFns-DZkO5okn.cjs → healingFns-i5gV3BMG.cjs} +29 -29
  31. package/dist/{helpers-BdGGaLhF.cjs → helpers-DJQeDf_5.cjs} +6 -6
  32. package/dist/{helpers-DpGcM2qZ.js → helpers-DPHQt2Kr.js} +6 -6
  33. package/dist/{importFns-DLiP26NW.cjs → importFns-BiRpt227.cjs} +319 -14
  34. package/dist/{importFns-Bp-p0jiP.js → importFns-CwrJsNvg.js} +314 -15
  35. package/dist/io/igesSupport.d.ts +6 -0
  36. package/dist/io/importFns.d.ts +15 -5
  37. package/dist/io/ioUtils.d.ts +15 -3
  38. package/dist/io/meshNesting.d.ts +11 -0
  39. package/dist/io/threemfImportFns.d.ts +6 -3
  40. package/dist/io.cjs +2 -2
  41. package/dist/io.js +2 -2
  42. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  43. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  44. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -2
  45. package/dist/{loftFns-DGV1z2NJ.cjs → loftFns-DgkK4Kj_.cjs} +1 -1
  46. package/dist/{loftFns-DQ7Z29n3.js → loftFns-lwzTh1fI.js} +1 -1
  47. package/dist/{measureFns-BdSjw5fr.cjs → measureFns-D_RRjCZg.cjs} +3 -3
  48. package/dist/{measureFns-BrdCH4cH.js → measureFns-Q3K25IfN.js} +3 -3
  49. package/dist/measurement.cjs +2 -2
  50. package/dist/measurement.js +2 -2
  51. package/dist/{meshFns-UE8tByyw.js → meshFns-BGoJU6_P.js} +20 -6
  52. package/dist/{meshFns-BeubBqEI.cjs → meshFns-Djbb4PUC.cjs} +25 -5
  53. package/dist/{occtWasmAdapter-DA7oMgcQ.js → occtWasmAdapter-BCCwaYkq.js} +7 -5
  54. package/dist/{occtWasmAdapter-D3qerQTq.cjs → occtWasmAdapter-UcYZRi-w.cjs} +7 -5
  55. package/dist/operations.cjs +2 -2
  56. package/dist/operations.js +2 -2
  57. package/dist/{primitiveFns-CLGVLwG8.cjs → primitiveFns-CfSnex9P.cjs} +19 -18
  58. package/dist/{primitiveFns-3-gs-FUX.js → primitiveFns-D-aYcwt2.js} +5 -4
  59. package/dist/{principalBoxFns-RMZItjfR.js → principalBoxFns-Dcp9gg5e.js} +3 -3
  60. package/dist/{principalBoxFns-CiXzjOkr.cjs → principalBoxFns-IY8FfPVj.cjs} +3 -3
  61. package/dist/projection.cjs +1 -1
  62. package/dist/projection.js +1 -1
  63. package/dist/query.cjs +2 -2
  64. package/dist/query.js +2 -2
  65. package/dist/{refResolveFns-kJg2iCad.js → refResolveFns-BPge7T5w.js} +6 -6
  66. package/dist/{refResolveFns-DNX0bCrP.cjs → refResolveFns-gZQ1o5XK.cjs} +6 -6
  67. package/dist/{shapeFns-SgIrOjN4.cjs → shapeFns-Bs92VrZh.cjs} +2 -2
  68. package/dist/{shapeFns-CZ6VF1yd.js → shapeFns-TWdr4Dv4.js} +2 -2
  69. package/dist/shapeRef.cjs +1 -1
  70. package/dist/shapeRef.js +1 -1
  71. package/dist/{shapeTypes-BNGu103j.js → shapeTypes-CIH-8d_a.js} +1 -1
  72. package/dist/{shapeTypes-MUEH4XuH.cjs → shapeTypes-DmThK_oa.cjs} +1 -1
  73. package/dist/sketching.cjs +3 -3
  74. package/dist/sketching.js +3 -3
  75. package/dist/{originTrackingFns-rEKOAP65.cjs → solidBuilders-DGskMugU.cjs} +209 -2
  76. package/dist/{originTrackingFns-c2qgRZ_9.js → solidBuilders-q_hwYsdo.js} +150 -3
  77. package/dist/{surfaceBuilders-DI376ai0.js → surfaceBuilders-DXo4N7wQ.js} +3 -3
  78. package/dist/{surfaceBuilders-DOmDVuMs.cjs → surfaceBuilders-DeSLKg73.cjs} +3 -3
  79. package/dist/text.cjs +2 -2
  80. package/dist/text.js +2 -2
  81. package/dist/{textBlueprints-CE0oxB43.js → textBlueprints-BYWZho_c.js} +8 -7
  82. package/dist/{textBlueprints-B7Vhr0xu.cjs → textBlueprints-Dz6wNgve.cjs} +9 -8
  83. package/dist/{textMetrics-C6_kSht6.cjs → textMetrics-bKoFTj3m.cjs} +1 -1
  84. package/dist/{textMetrics-_VGqdewQ.js → textMetrics-k_rGqib2.js} +1 -1
  85. package/dist/{threadFns-CHdY-4Cz.js → threadFns-BeB8s0tA.js} +7 -7
  86. package/dist/{threadFns-1H60LrFX.cjs → threadFns-CoGAFHHt.cjs} +9 -9
  87. package/dist/topology/meshFns.d.ts +3 -0
  88. package/dist/topology.cjs +11 -11
  89. package/dist/topology.js +9 -9
  90. package/dist/{topologyQueryFns-C_fXO6xL.cjs → topologyQueryFns-CXbCFaU2.cjs} +1 -1
  91. package/dist/{topologyQueryFns-CltEv7Pi.js → topologyQueryFns-Cp0yekBh.js} +1 -1
  92. package/dist/{validityTypes-GanLrmvY.js → validityTypes-DlrWkrSR.js} +1 -1
  93. package/dist/{validityTypes-CGX2ES81.cjs → validityTypes-m6eLRTYE.cjs} +1 -1
  94. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
2
+ const require_errors = require("./errors-O_blYTWT.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
3
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
+ const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
4
6
  // src/topology/metadata/originTrackingFns.ts
5
7
  /**
6
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -199,12 +201,211 @@ function propagateOriginsByHash(inputs, result) {
199
201
  cache.faceOrigins = resultMap;
200
202
  }
201
203
  }
204
+ // src/topology/shapeUtils.ts
205
+ /**
206
+ * Shape assembly utilities — welding and sewing operations.
207
+ */
208
+ /** Sew faces/shells into a single shape using the kernel's sewing algorithm. */
209
+ function weldShapes(facesOrShells) {
210
+ const sewn = require_shapeTypes.getKernel().sew(facesOrShells.map((s) => s.wrapped));
211
+ return require_shapeTypes.castResultShape(sewn);
212
+ }
213
+ /**
214
+ * Welds faces and shells into a single shell.
215
+ *
216
+ * @param facesOrShells - An array of faces and shells to be welded.
217
+ * @param ignoreType - If true, the function will not check if the result is a shell.
218
+ * @returns A shell that contains all the faces and shells.
219
+ */
220
+ function weldShellsAndFaces(facesOrShells, ignoreType = false) {
221
+ const shell = weldShapes(facesOrShells);
222
+ if (!ignoreType && !require_shapeTypes.isShell(shell)) return require_errors.err(require_errors.typeCastError("WELD_NOT_SHELL", "Could not make a shell from faces and shells"));
223
+ return require_errors.ok(shell);
224
+ }
225
+ // src/topology/solidBuilders.ts
226
+ /**
227
+ * Solid and primitive construction helpers — boxes, cylinders, spheres, cones,
228
+ * tori, ellipsoids, vertices, compounds, and offsets.
229
+ */
230
+ /**
231
+ * Creates a cylinder with the given radius and height.
232
+ *
233
+ * @category Solids
234
+ */
235
+ function makeCylinder(radius, height, location = [
236
+ 0,
237
+ 0,
238
+ 0
239
+ ], direction = [
240
+ 0,
241
+ 0,
242
+ 1
243
+ ]) {
244
+ return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeCylinder(radius, height, [...location], [...direction]));
245
+ }
246
+ /**
247
+ * Creates a sphere with the given radius.
248
+ *
249
+ * @category Solids
250
+ */
251
+ function makeSphere(radius) {
252
+ return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeSphere(radius));
253
+ }
254
+ /**
255
+ * Creates a cone (or frustum) with the given radii and height.
256
+ *
257
+ * @category Solids
258
+ */
259
+ function makeCone(radius1, radius2, height, location = [
260
+ 0,
261
+ 0,
262
+ 0
263
+ ], direction = [
264
+ 0,
265
+ 0,
266
+ 1
267
+ ]) {
268
+ return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeCone(radius1, radius2, height, [...location], [...direction]));
269
+ }
270
+ /**
271
+ * Creates a torus with the given major and minor radii.
272
+ *
273
+ * @category Solids
274
+ */
275
+ function makeTorus(majorRadius, minorRadius, location = [
276
+ 0,
277
+ 0,
278
+ 0
279
+ ], direction = [
280
+ 0,
281
+ 0,
282
+ 1
283
+ ]) {
284
+ return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeTorus(majorRadius, minorRadius, [...location], [...direction]));
285
+ }
286
+ /**
287
+ * Creates an ellipsoid with the given axis lengths.
288
+ *
289
+ * The algorithm creates a unit BSpline sphere surface, transforms its
290
+ * control-point poles with an affinity matrix to match the requested
291
+ * axis half-lengths, then sews the result into a solid.
292
+ *
293
+ * @category Solids
294
+ */
295
+ function makeEllipsoid(aLength, bLength, cLength) {
296
+ return require_shapeTypes.createSolid(require_shapeTypes.getKernel().makeEllipsoid(aLength, bLength, cLength));
297
+ }
298
+ /** Create a vertex at a 3D point. */
299
+ function makeVertex(point) {
300
+ return require_shapeTypes.createVertex(require_shapeTypes.getKernel().makeVertex(point[0], point[1], point[2]));
301
+ }
302
+ /**
303
+ * Create an offset shape from a face.
304
+ *
305
+ * @param offset - Signed offset distance (positive = outward).
306
+ * @param tolerance - Geometric tolerance for the offset algorithm.
307
+ * @returns An error if the result is not a valid 3D shape.
308
+ */
309
+ function makeOffset(face, offset, tolerance = 1e-6) {
310
+ const resultShape = require_shapeTypes.getKernel().offset(face.wrapped, offset, tolerance);
311
+ return require_errors.andThen(require_faceFns.downcast(resultShape), (downcasted) => require_errors.andThen(require_faceFns.cast(downcasted), (newShape) => {
312
+ if (!require_shapeTypes.isShape3D(newShape)) return require_errors.err(require_errors.typeCastError("OFFSET_NOT_3D", "Could not offset to a 3d shape"));
313
+ return require_errors.ok(newShape);
314
+ }));
315
+ }
316
+ /**
317
+ * Build a compound from multiple shapes.
318
+ *
319
+ * @param shapeArray - Shapes to group into a single compound.
320
+ * @returns A new Compound containing all input shapes.
321
+ */
322
+ function makeCompound(shapeArray) {
323
+ return require_shapeTypes.createCompound(require_shapeTypes.getKernel().makeCompound(shapeArray.map((s) => s.wrapped)));
324
+ }
325
+ /**
326
+ * Welds faces and shells into a single shell and then makes a solid.
327
+ *
328
+ * @param facesOrShells - An array of faces and shells to be welded.
329
+ * @returns A solid that contains all the faces and shells.
330
+ *
331
+ * @category Solids
332
+ */
333
+ function makeSolid(facesOrShells) {
334
+ try {
335
+ var _usingCtx$1 = require_shapeTypes._usingCtx();
336
+ const shell = _usingCtx$1.u(weldShapes(facesOrShells));
337
+ const solid = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().solidFromShell(shell.wrapped));
338
+ if (!require_shapeTypes.isSolid(solid)) {
339
+ require_shapeTypes.disposeResultShape(solid);
340
+ return require_errors.err(require_errors.typeCastError("SOLID_BUILD_FAILED", "Could not make a solid of faces and shells"));
341
+ }
342
+ return require_errors.ok(solid);
343
+ } catch (_) {
344
+ _usingCtx$1.e = _;
345
+ } finally {
346
+ _usingCtx$1.d();
347
+ }
348
+ }
202
349
  Object.defineProperty(exports, "getFaceOrigins", {
203
350
  enumerable: true,
204
351
  get: function() {
205
352
  return getFaceOrigins;
206
353
  }
207
354
  });
355
+ Object.defineProperty(exports, "makeCompound", {
356
+ enumerable: true,
357
+ get: function() {
358
+ return makeCompound;
359
+ }
360
+ });
361
+ Object.defineProperty(exports, "makeCone", {
362
+ enumerable: true,
363
+ get: function() {
364
+ return makeCone;
365
+ }
366
+ });
367
+ Object.defineProperty(exports, "makeCylinder", {
368
+ enumerable: true,
369
+ get: function() {
370
+ return makeCylinder;
371
+ }
372
+ });
373
+ Object.defineProperty(exports, "makeEllipsoid", {
374
+ enumerable: true,
375
+ get: function() {
376
+ return makeEllipsoid;
377
+ }
378
+ });
379
+ Object.defineProperty(exports, "makeOffset", {
380
+ enumerable: true,
381
+ get: function() {
382
+ return makeOffset;
383
+ }
384
+ });
385
+ Object.defineProperty(exports, "makeSolid", {
386
+ enumerable: true,
387
+ get: function() {
388
+ return makeSolid;
389
+ }
390
+ });
391
+ Object.defineProperty(exports, "makeSphere", {
392
+ enumerable: true,
393
+ get: function() {
394
+ return makeSphere;
395
+ }
396
+ });
397
+ Object.defineProperty(exports, "makeTorus", {
398
+ enumerable: true,
399
+ get: function() {
400
+ return makeTorus;
401
+ }
402
+ });
403
+ Object.defineProperty(exports, "makeVertex", {
404
+ enumerable: true,
405
+ get: function() {
406
+ return makeVertex;
407
+ }
408
+ });
208
409
  Object.defineProperty(exports, "propagateOriginsByHash", {
209
410
  enumerable: true,
210
411
  get: function() {
@@ -223,3 +424,9 @@ Object.defineProperty(exports, "setShapeOrigin", {
223
424
  return setShapeOrigin;
224
425
  }
225
426
  });
427
+ Object.defineProperty(exports, "weldShellsAndFaces", {
428
+ enumerable: true,
429
+ get: function() {
430
+ return weldShellsAndFaces;
431
+ }
432
+ });
@@ -1,6 +1,8 @@
1
- import { q as getKernel } from "./shapeTypes-BNGu103j.js";
2
- import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-CltEv7Pi.js";
1
+ import { C as isSolid, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-CIH-8d_a.js";
2
+ import { E as ok, g as err, l as typeCastError, m as andThen } from "./errors-BTccWbtE.js";
3
+ import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-Cp0yekBh.js";
3
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
+ import { _ as cast, y as downcast } from "./faceFns-BgRNa5vx.js";
4
6
  // src/topology/metadata/originTrackingFns.ts
5
7
  /**
6
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -199,4 +201,149 @@ function propagateOriginsByHash(inputs, result) {
199
201
  cache.faceOrigins = resultMap;
200
202
  }
201
203
  }
202
- export { setShapeOrigin as i, propagateOriginsByHash as n, propagateOriginsFromEvolution as r, getFaceOrigins as t };
204
+ // src/topology/shapeUtils.ts
205
+ /**
206
+ * Shape assembly utilities — welding and sewing operations.
207
+ */
208
+ /** Sew faces/shells into a single shape using the kernel's sewing algorithm. */
209
+ function weldShapes(facesOrShells) {
210
+ const sewn = getKernel().sew(facesOrShells.map((s) => s.wrapped));
211
+ return castResultShape(sewn);
212
+ }
213
+ /**
214
+ * Welds faces and shells into a single shell.
215
+ *
216
+ * @param facesOrShells - An array of faces and shells to be welded.
217
+ * @param ignoreType - If true, the function will not check if the result is a shell.
218
+ * @returns A shell that contains all the faces and shells.
219
+ */
220
+ function weldShellsAndFaces(facesOrShells, ignoreType = false) {
221
+ const shell = weldShapes(facesOrShells);
222
+ if (!ignoreType && !isShell(shell)) return err(typeCastError("WELD_NOT_SHELL", "Could not make a shell from faces and shells"));
223
+ return ok(shell);
224
+ }
225
+ // src/topology/solidBuilders.ts
226
+ /**
227
+ * Solid and primitive construction helpers — boxes, cylinders, spheres, cones,
228
+ * tori, ellipsoids, vertices, compounds, and offsets.
229
+ */
230
+ /**
231
+ * Creates a cylinder with the given radius and height.
232
+ *
233
+ * @category Solids
234
+ */
235
+ function makeCylinder(radius, height, location = [
236
+ 0,
237
+ 0,
238
+ 0
239
+ ], direction = [
240
+ 0,
241
+ 0,
242
+ 1
243
+ ]) {
244
+ return createSolid(getKernel().makeCylinder(radius, height, [...location], [...direction]));
245
+ }
246
+ /**
247
+ * Creates a sphere with the given radius.
248
+ *
249
+ * @category Solids
250
+ */
251
+ function makeSphere(radius) {
252
+ return createSolid(getKernel().makeSphere(radius));
253
+ }
254
+ /**
255
+ * Creates a cone (or frustum) with the given radii and height.
256
+ *
257
+ * @category Solids
258
+ */
259
+ function makeCone(radius1, radius2, height, location = [
260
+ 0,
261
+ 0,
262
+ 0
263
+ ], direction = [
264
+ 0,
265
+ 0,
266
+ 1
267
+ ]) {
268
+ return createSolid(getKernel().makeCone(radius1, radius2, height, [...location], [...direction]));
269
+ }
270
+ /**
271
+ * Creates a torus with the given major and minor radii.
272
+ *
273
+ * @category Solids
274
+ */
275
+ function makeTorus(majorRadius, minorRadius, location = [
276
+ 0,
277
+ 0,
278
+ 0
279
+ ], direction = [
280
+ 0,
281
+ 0,
282
+ 1
283
+ ]) {
284
+ return createSolid(getKernel().makeTorus(majorRadius, minorRadius, [...location], [...direction]));
285
+ }
286
+ /**
287
+ * Creates an ellipsoid with the given axis lengths.
288
+ *
289
+ * The algorithm creates a unit BSpline sphere surface, transforms its
290
+ * control-point poles with an affinity matrix to match the requested
291
+ * axis half-lengths, then sews the result into a solid.
292
+ *
293
+ * @category Solids
294
+ */
295
+ function makeEllipsoid(aLength, bLength, cLength) {
296
+ return createSolid(getKernel().makeEllipsoid(aLength, bLength, cLength));
297
+ }
298
+ /** Create a vertex at a 3D point. */
299
+ function makeVertex(point) {
300
+ return createVertex(getKernel().makeVertex(point[0], point[1], point[2]));
301
+ }
302
+ /**
303
+ * Create an offset shape from a face.
304
+ *
305
+ * @param offset - Signed offset distance (positive = outward).
306
+ * @param tolerance - Geometric tolerance for the offset algorithm.
307
+ * @returns An error if the result is not a valid 3D shape.
308
+ */
309
+ function makeOffset(face, offset, tolerance = 1e-6) {
310
+ const resultShape = getKernel().offset(face.wrapped, offset, tolerance);
311
+ return andThen(downcast(resultShape), (downcasted) => andThen(cast(downcasted), (newShape) => {
312
+ if (!isShape3D(newShape)) return err(typeCastError("OFFSET_NOT_3D", "Could not offset to a 3d shape"));
313
+ return ok(newShape);
314
+ }));
315
+ }
316
+ /**
317
+ * Build a compound from multiple shapes.
318
+ *
319
+ * @param shapeArray - Shapes to group into a single compound.
320
+ * @returns A new Compound containing all input shapes.
321
+ */
322
+ function makeCompound(shapeArray) {
323
+ return createCompound(getKernel().makeCompound(shapeArray.map((s) => s.wrapped)));
324
+ }
325
+ /**
326
+ * Welds faces and shells into a single shell and then makes a solid.
327
+ *
328
+ * @param facesOrShells - An array of faces and shells to be welded.
329
+ * @returns A solid that contains all the faces and shells.
330
+ *
331
+ * @category Solids
332
+ */
333
+ function makeSolid(facesOrShells) {
334
+ try {
335
+ var _usingCtx$1 = _usingCtx();
336
+ const shell = _usingCtx$1.u(weldShapes(facesOrShells));
337
+ const solid = castResultShape(getKernel().solidFromShell(shell.wrapped));
338
+ if (!isSolid(solid)) {
339
+ disposeResultShape(solid);
340
+ return err(typeCastError("SOLID_BUILD_FAILED", "Could not make a solid of faces and shells"));
341
+ }
342
+ return ok(solid);
343
+ } catch (_) {
344
+ _usingCtx$1.e = _;
345
+ } finally {
346
+ _usingCtx$1.d();
347
+ }
348
+ }
349
+ export { makeOffset as a, makeTorus as c, getFaceOrigins as d, propagateOriginsByHash as f, makeEllipsoid as i, makeVertex as l, setShapeOrigin as m, makeCone as n, makeSolid as o, propagateOriginsFromEvolution as p, makeCylinder as r, makeSphere as s, makeCompound as t, weldShellsAndFaces as u };
@@ -1,7 +1,7 @@
1
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-BNGu103j.js";
1
+ import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-CIH-8d_a.js";
2
2
  import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-BTccWbtE.js";
3
- import { a as isPlanarFace } from "./validityTypes-GanLrmvY.js";
4
- import { _ as cast, u as outerWire } from "./faceFns-Q87HCJrp.js";
3
+ import { a as isPlanarFace } from "./validityTypes-DlrWkrSR.js";
4
+ import { _ as cast, u as outerWire } from "./faceFns-BgRNa5vx.js";
5
5
  // src/utils/range.ts
6
6
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
7
7
  function range(len) {
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-CGX2ES81.cjs");
4
- const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
3
+ const require_validityTypes = require("./validityTypes-m6eLRTYE.cjs");
4
+ const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
5
5
  // src/utils/range.ts
6
6
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
7
7
  function range(len) {
package/dist/text.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-B7Vhr0xu.cjs");
3
- const require_textMetrics = require("./textMetrics-C6_kSht6.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-Dz6wNgve.cjs");
3
+ const require_textMetrics = require("./textMetrics-bKoFTj3m.cjs");
4
4
  exports.fontMetrics = require_textMetrics.fontMetrics;
5
5
  exports.getFont = require_textBlueprints.getFont;
6
6
  exports.loadFont = require_textBlueprints.loadFont;
package/dist/text.js CHANGED
@@ -1,3 +1,3 @@
1
- import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-CE0oxB43.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-_VGqdewQ.js";
1
+ import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BYWZho_c.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-k_rGqib2.js";
3
3
  export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
@@ -1,18 +1,19 @@
1
- import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-BNGu103j.js";
1
+ import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-CIH-8d_a.js";
2
2
  import { n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, P as unwrap, d as validationError, g as err, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  import { r as toVec3 } from "./types-CKXsIm9-.js";
6
6
  import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-S-m9H_fe.js";
7
7
  import { n as createPlane } from "./planeOps-D3yDuMux.js";
8
- import { v as copyShape } from "./faceFns-Q87HCJrp.js";
9
- import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-Bmr59cGp.js";
8
+ import { v as copyShape } from "./faceFns-BgRNa5vx.js";
9
+ import { o as makeSolid, t as makeCompound } from "./solidBuilders-q_hwYsdo.js";
10
+ import { r as cutAll } from "./booleanFns-cNfXGqMX.js";
10
11
  import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
11
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CEI-rouh.js";
12
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-C4CqthJp.js";
12
13
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
13
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-DI376ai0.js";
14
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-C1WCI6E0.js";
15
- import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-DQ7Z29n3.js";
14
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-DXo4N7wQ.js";
15
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-B15522Kr.js";
16
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-lwzTh1fI.js";
16
17
  import opentype from "opentype.js";
17
18
  // src/topology/shapeRef/extrudeRoleFns.ts
18
19
  /** Match tolerance as a fraction of the extrusion's size. */
@@ -1,19 +1,20 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
3
3
  const require_bug = require("./bug-CBcpIPuf.cjs");
4
4
  const require_errors = require("./errors-O_blYTWT.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
6
  const require_types = require("./types-CjF9Rofr.cjs");
7
7
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
8
8
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
9
- const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
10
- const require_solidBuilders = require("./solidBuilders-DdG4NPHM.cjs");
9
+ const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
10
+ const require_solidBuilders = require("./solidBuilders-DGskMugU.cjs");
11
+ const require_booleanFns = require("./booleanFns-D5nQ1nWS.cjs");
11
12
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
12
- const require_curveFns = require("./curveFns-BAM7QHrP.cjs");
13
+ const require_curveFns = require("./curveFns-B5_N-gMj.cjs");
13
14
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
14
- const require_surfaceBuilders = require("./surfaceBuilders-DOmDVuMs.cjs");
15
- const require_blueprintSketcher = require("./blueprintSketcher-BG--DxWB.cjs");
16
- const require_loftFns = require("./loftFns-DGV1z2NJ.cjs");
15
+ const require_surfaceBuilders = require("./surfaceBuilders-DeSLKg73.cjs");
16
+ const require_blueprintSketcher = require("./blueprintSketcher-Brj4lXjj.cjs");
17
+ const require_loftFns = require("./loftFns-DgkK4Kj_.cjs");
17
18
  let opentype_js = require("opentype.js");
18
19
  opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
19
20
  // src/topology/shapeRef/extrudeRoleFns.ts
@@ -524,7 +525,7 @@ var holedSweptSolid = (sketches, solidGenerator) => {
524
525
  const holes = sketches.slice(1).map((s) => require_errors.unwrap(solidGenerator(s)));
525
526
  if (holes.length === 0) return outer;
526
527
  try {
527
- return require_errors.unwrap(require_solidBuilders.cutAll(outer, holes, { unsafe: true }));
528
+ return require_errors.unwrap(require_booleanFns.cutAll(outer, holes, { unsafe: true }));
528
529
  } finally {
529
530
  outer.delete();
530
531
  for (const h of holes) h.delete();
@@ -1,5 +1,5 @@
1
1
  const require_errors = require("./errors-O_blYTWT.cjs");
2
- const require_textBlueprints = require("./textBlueprints-B7Vhr0xu.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-Dz6wNgve.cjs");
3
3
  // src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,5 +1,5 @@
1
1
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
2
- import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-CE0oxB43.js";
2
+ import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-BYWZho_c.js";
3
3
  // src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,12 +1,12 @@
1
- import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-BNGu103j.js";
1
+ import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CIH-8d_a.js";
2
2
  import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-BTccWbtE.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
4
- import { b as fromBREP } from "./faceFns-Q87HCJrp.js";
5
- import { h as fuseAll } from "./solidBuilders-Bmr59cGp.js";
6
- import { E as wire, h as line } from "./primitiveFns-3-gs-FUX.js";
7
- import { s as toBREP, t as clone } from "./shapeFns-CZ6VF1yd.js";
8
- import { t as loft } from "./loftFns-DQ7Z29n3.js";
9
- import { c as resolveRefParams } from "./refResolveFns-kJg2iCad.js";
4
+ import { b as fromBREP } from "./faceFns-BgRNa5vx.js";
5
+ import { a as fuseAll } from "./booleanFns-cNfXGqMX.js";
6
+ import { E as wire, h as line } from "./primitiveFns-D-aYcwt2.js";
7
+ import { s as toBREP, t as clone } from "./shapeFns-TWdr4Dv4.js";
8
+ import { t as loft } from "./loftFns-lwzTh1fI.js";
9
+ import { c as resolveRefParams } from "./refResolveFns-BPge7T5w.js";
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
4
- const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
5
- const require_solidBuilders = require("./solidBuilders-DdG4NPHM.cjs");
6
- const require_primitiveFns = require("./primitiveFns-CLGVLwG8.cjs");
7
- const require_shapeFns = require("./shapeFns-SgIrOjN4.cjs");
8
- const require_loftFns = require("./loftFns-DGV1z2NJ.cjs");
9
- const require_refResolveFns = require("./refResolveFns-DNX0bCrP.cjs");
4
+ const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
5
+ const require_booleanFns = require("./booleanFns-D5nQ1nWS.cjs");
6
+ const require_primitiveFns = require("./primitiveFns-CfSnex9P.cjs");
7
+ const require_shapeFns = require("./shapeFns-Bs92VrZh.cjs");
8
+ const require_loftFns = require("./loftFns-DgkK4Kj_.cjs");
9
+ const require_refResolveFns = require("./refResolveFns-gZQ1o5XK.cjs");
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -152,7 +152,7 @@ function linearPattern(shape, direction, count, spacing, options) {
152
152
  const dir = require_vecOps.vecNormalize(direction);
153
153
  const copies = require_shapeTypes.getKernel().linearPattern(shape.wrapped, [...dir], spacing, count).map((s) => require_shapeTypes.castResultShape(s));
154
154
  try {
155
- return require_solidBuilders.fuseAll(copies, {
155
+ return require_booleanFns.fuseAll(copies, {
156
156
  ...options,
157
157
  unsafe: true
158
158
  });
@@ -187,7 +187,7 @@ function circularPattern(shape, axis, count, fullAngle = 360, center = [
187
187
  const angleStep = fullAngle / (Math.abs(Math.abs(fullAngle) - 360) < 1e-9 ? count : count - 1);
188
188
  const copies = require_shapeTypes.getKernel().circularPattern(shape.wrapped, [...center], [...axis], angleStep, count).map((s) => require_shapeTypes.castResultShape(s));
189
189
  try {
190
- return require_solidBuilders.fuseAll(copies, {
190
+ return require_booleanFns.fuseAll(copies, {
191
191
  ...options,
192
192
  unsafe: true
193
193
  });
@@ -79,6 +79,9 @@ export declare function exportSTL(shape: AnyShape<Dimension>, opts?: MeshOptions
79
79
  * Export a shape as an IGES file Blob.
80
80
  *
81
81
  * @returns Ok with a Blob (MIME type `application/iges`), or Err on failure.
82
+ *
83
+ * @remarks The default occt-wasm kernel is built without an IGES translator, so
84
+ * there this returns an `UNSUPPORTED_CAPABILITY` error; export STEP instead.
82
85
  */
83
86
  export declare function exportIGES(shape: AnyShape<Dimension>): Result<Blob>;
84
87
  export interface MultiLODMesh {
package/dist/topology.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
3
- const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
4
- const require_solidBuilders = require("./solidBuilders-DdG4NPHM.cjs");
5
- const require_primitiveFns = require("./primitiveFns-CLGVLwG8.cjs");
6
- const require_shapeFns = require("./shapeFns-SgIrOjN4.cjs");
7
- const require_curveFns = require("./curveFns-BAM7QHrP.cjs");
8
- const require_meshFns = require("./meshFns-BeubBqEI.cjs");
9
- const require_healingFns = require("./healingFns-DZkO5okn.cjs");
10
- const require_adjacencyFns = require("./adjacencyFns-mMmTBUBY.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
3
+ const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
4
+ const require_booleanFns = require("./booleanFns-D5nQ1nWS.cjs");
5
+ const require_primitiveFns = require("./primitiveFns-CfSnex9P.cjs");
6
+ const require_shapeFns = require("./shapeFns-Bs92VrZh.cjs");
7
+ const require_curveFns = require("./curveFns-B5_N-gMj.cjs");
8
+ const require_meshFns = require("./meshFns-Djbb4PUC.cjs");
9
+ const require_healingFns = require("./healingFns-i5gV3BMG.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-BfgFo-Rh.cjs");
11
11
  exports.addHoles = require_primitiveFns.addHoles;
12
12
  exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
13
13
  exports.approximateCurve = require_curveFns.approximateCurve;
@@ -35,7 +35,7 @@ exports.curvePeriod = require_curveFns.curvePeriod;
35
35
  exports.curvePointAt = require_curveFns.curvePointAt;
36
36
  exports.curveStartPoint = require_curveFns.curveStartPoint;
37
37
  exports.curveTangentAt = require_curveFns.curveTangentAt;
38
- exports.cutAll = require_solidBuilders.cutAll;
38
+ exports.cutAll = require_booleanFns.cutAll;
39
39
  exports.cutAllBisect = require_healingFns.cutAllBisect;
40
40
  exports.cutWithEvolution = require_healingFns.cutWithEvolution;
41
41
  exports.cylinder = require_primitiveFns.cylinder;
@@ -60,7 +60,7 @@ exports.fixSelfIntersection = require_healingFns.fixSelfIntersection;
60
60
  exports.fixShape = require_healingFns.fixShape;
61
61
  exports.flipFaceOrientation = require_faceFns.flipFaceOrientation;
62
62
  exports.flipOrientation = require_curveFns.flipOrientation;
63
- exports.fuseAll = require_solidBuilders.fuseAll;
63
+ exports.fuseAll = require_booleanFns.fuseAll;
64
64
  exports.fuseAllBisect = require_healingFns.fuseAllBisect;
65
65
  exports.fuseWithEvolution = require_healingFns.fuseWithEvolution;
66
66
  exports.getBounds = require_topologyQueryFns.getBounds;