brepjs 20.12.7 → 20.12.9

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 (99) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-hMihivxC.js → adjacencyFns-1Cmjb2ot.js} +3 -3
  4. package/dist/{adjacencyFns-mMmTBUBY.cjs → adjacencyFns-CfhGIMeR.cjs} +3 -3
  5. package/dist/{blueprint-BS50D3J_.js → blueprint-BVcuEefs.js} +5 -5
  6. package/dist/{blueprint-17RUHsoP.cjs → blueprint-DbJVzU9F.cjs} +5 -5
  7. package/dist/{blueprintFns-Dw5_4_Bk.cjs → blueprintFns-DePTHG1I.cjs} +2 -2
  8. package/dist/{blueprintFns-zy5lo2IF.js → blueprintFns-mD4pDyFP.js} +2 -2
  9. package/dist/{blueprintSketcher-BG--DxWB.cjs → blueprintSketcher-B5CFmhjg.cjs} +3 -3
  10. package/dist/{blueprintSketcher-C1WCI6E0.js → blueprintSketcher-BrGmq-65.js} +3 -3
  11. package/dist/{boolean2D-CsdyfjFE.js → boolean2D-BrHrY60M.js} +4 -4
  12. package/dist/{boolean2D-7SQ3B0pC.cjs → boolean2D-CFKg1FJ_.cjs} +4 -4
  13. package/dist/{solidBuilders-DdG4NPHM.cjs → booleanFns-C640CeaY.cjs} +11 -217
  14. package/dist/{solidBuilders-Bmr59cGp.js → booleanFns-CKDyqKz0.js} +10 -156
  15. package/dist/brepjs.cjs +325 -168
  16. package/dist/brepjs.js +282 -125
  17. package/dist/{cameraFns-BVWyAscu.js → cameraFns-DIbua1lC.js} +3 -3
  18. package/dist/{cameraFns-BAtzhCYM.cjs → cameraFns-hXUKJkLg.cjs} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-Dv_2rmaY.js → cornerFinder-BYDkloVc.js} +1 -1
  22. package/dist/{cornerFinder-e4Wc7_yp.cjs → cornerFinder-ByBGU0r7.cjs} +1 -1
  23. package/dist/{curveFns-BAM7QHrP.cjs → curveFns-Cqgtmhr0.cjs} +1 -1
  24. package/dist/{curveFns-CEI-rouh.js → curveFns-DphpaoQ4.js} +1 -1
  25. package/dist/{drawFns-Cl1i8B_B.js → drawFns-Ch3ah8K9.js} +12 -12
  26. package/dist/{drawFns-d-RvC6u6.cjs → drawFns-GwVZX47o.cjs} +12 -12
  27. package/dist/{faceFns-C-2ttg8X.cjs → faceFns-BDqVGEoB.cjs} +2 -2
  28. package/dist/{faceFns-Q87HCJrp.js → faceFns-D4cDeMRf.js} +2 -2
  29. package/dist/{healingFns-Cm4NkKD8.js → healingFns--vBKh5pa.js} +5 -5
  30. package/dist/{healingFns-DZkO5okn.cjs → healingFns-Fu7Xl8fu.cjs} +29 -29
  31. package/dist/{helpers-DpGcM2qZ.js → helpers-CroIo2SI.js} +6 -6
  32. package/dist/{helpers-BdGGaLhF.cjs → helpers-Wnq-YPWv.cjs} +6 -6
  33. package/dist/{importFns-Bp-p0jiP.js → importFns-D5Bt_44J.js} +314 -15
  34. package/dist/{importFns-DLiP26NW.cjs → importFns-tHr15Lhm.cjs} +319 -14
  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/evolutionOps.d.ts +4 -3
  43. package/dist/kernel/occtWasm/helpers.d.ts +14 -3
  44. package/dist/kernel/occtWasm/ioOps.d.ts +13 -13
  45. package/dist/kernel/occtWasm/modifierOps.d.ts +5 -3
  46. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  47. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
  48. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  49. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +37 -2
  50. package/dist/{loftFns-DQ7Z29n3.js → loftFns-Bh_RuF7a.js} +1 -1
  51. package/dist/{loftFns-DGV1z2NJ.cjs → loftFns-T0GxcPlB.cjs} +1 -1
  52. package/dist/{measureFns-BrdCH4cH.js → measureFns-C3TZ5Fj9.js} +3 -3
  53. package/dist/{measureFns-BdSjw5fr.cjs → measureFns-DGm6ndQY.cjs} +3 -3
  54. package/dist/measurement.cjs +2 -2
  55. package/dist/measurement.js +2 -2
  56. package/dist/{meshFns-BeubBqEI.cjs → meshFns-DDgZ3vpr.cjs} +25 -5
  57. package/dist/{meshFns-UE8tByyw.js → meshFns-Go1XSyUh.js} +20 -6
  58. package/dist/{occtWasmAdapter-D3qerQTq.cjs → occtWasmAdapter-CZPZnpCe.cjs} +297 -85
  59. package/dist/{occtWasmAdapter-DA7oMgcQ.js → occtWasmAdapter-EM3EhKwk.js} +297 -85
  60. package/dist/operations.cjs +2 -2
  61. package/dist/operations.js +2 -2
  62. package/dist/{primitiveFns-3-gs-FUX.js → primitiveFns-CeRc4Sls.js} +5 -4
  63. package/dist/{primitiveFns-CLGVLwG8.cjs → primitiveFns-Dg_XWYtp.cjs} +19 -18
  64. package/dist/{principalBoxFns-CiXzjOkr.cjs → principalBoxFns-B5zdek3y.cjs} +3 -3
  65. package/dist/{principalBoxFns-RMZItjfR.js → principalBoxFns-BuK-ueAB.js} +3 -3
  66. package/dist/projection.cjs +1 -1
  67. package/dist/projection.js +1 -1
  68. package/dist/query.cjs +2 -2
  69. package/dist/query.js +2 -2
  70. package/dist/{refResolveFns-DNX0bCrP.cjs → refResolveFns-CFwsYCKA.cjs} +6 -6
  71. package/dist/{refResolveFns-kJg2iCad.js → refResolveFns-WRcvVhV-.js} +6 -6
  72. package/dist/{shapeFns-CZ6VF1yd.js → shapeFns-CYjU8PsF.js} +2 -2
  73. package/dist/{shapeFns-SgIrOjN4.cjs → shapeFns-DuxfaqTw.cjs} +2 -2
  74. package/dist/shapeRef.cjs +1 -1
  75. package/dist/shapeRef.js +1 -1
  76. package/dist/{shapeTypes-MUEH4XuH.cjs → shapeTypes--7XBFlOD.cjs} +1 -1
  77. package/dist/{shapeTypes-BNGu103j.js → shapeTypes-DvzbSivn.js} +1 -1
  78. package/dist/sketching.cjs +3 -3
  79. package/dist/sketching.js +3 -3
  80. package/dist/{originTrackingFns-c2qgRZ_9.js → solidBuilders-BqSVC4cB.js} +150 -3
  81. package/dist/{originTrackingFns-rEKOAP65.cjs → solidBuilders-D0bIZX9K.cjs} +209 -2
  82. package/dist/{surfaceBuilders-DI376ai0.js → surfaceBuilders--HOoTQad.js} +3 -3
  83. package/dist/{surfaceBuilders-DOmDVuMs.cjs → surfaceBuilders-CPQHyL_5.cjs} +3 -3
  84. package/dist/text.cjs +2 -2
  85. package/dist/text.js +2 -2
  86. package/dist/{textBlueprints-B7Vhr0xu.cjs → textBlueprints-B4HzJzZM.cjs} +9 -8
  87. package/dist/{textBlueprints-CE0oxB43.js → textBlueprints-plsbHqiI.js} +8 -7
  88. package/dist/{textMetrics-C6_kSht6.cjs → textMetrics-CBwUIDI7.cjs} +1 -1
  89. package/dist/{textMetrics-_VGqdewQ.js → textMetrics-IIS6DUTr.js} +1 -1
  90. package/dist/{threadFns-CHdY-4Cz.js → threadFns-CmZFykpi.js} +7 -7
  91. package/dist/{threadFns-1H60LrFX.cjs → threadFns-e8_26ZYw.cjs} +9 -9
  92. package/dist/topology/meshFns.d.ts +3 -0
  93. package/dist/topology.cjs +11 -11
  94. package/dist/topology.js +9 -9
  95. package/dist/{topologyQueryFns-CltEv7Pi.js → topologyQueryFns-BUzMuIs5.js} +1 -1
  96. package/dist/{topologyQueryFns-C_fXO6xL.cjs → topologyQueryFns-NszVx8a0.cjs} +1 -1
  97. package/dist/{validityTypes-GanLrmvY.js → validityTypes-CdY06B8c.js} +1 -1
  98. package/dist/{validityTypes-CGX2ES81.cjs → validityTypes-Ds4zNICF.cjs} +1 -1
  99. package/package.json +2 -2
@@ -1,10 +1,11 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
1
+ const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-CGX2ES81.cjs");
3
+ const require_validityTypes = require("./validityTypes-Ds4zNICF.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
- const require_solidBuilders = require("./solidBuilders-DdG4NPHM.cjs");
7
- const require_surfaceBuilders = require("./surfaceBuilders-DOmDVuMs.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-D0bIZX9K.cjs");
7
+ const require_booleanFns = require("./booleanFns-C640CeaY.cjs");
8
+ const require_surfaceBuilders = require("./surfaceBuilders-CPQHyL_5.cjs");
8
9
  // src/topology/transformFns.ts
9
10
  /**
10
11
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -12,10 +13,10 @@ const require_surfaceBuilders = require("./surfaceBuilders-DOmDVuMs.cjs");
12
13
  */
13
14
  /** Translate a shape by a vector. Returns a new shape. */
14
15
  function translate(shape, v) {
15
- const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
16
+ const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
16
17
  const { shape: resultShape, evolution } = require_shapeTypes.getKernel().translateWithHistory(shape.wrapped, v[0], v[1], v[2], inputFaceHashes, require_constants.HASH_CODE_MAX);
17
18
  const result = require_shapeTypes.castResultShape(resultShape);
18
- require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
19
+ require_booleanFns.propagateAllMetadata(evolution, [shape], result);
19
20
  return result;
20
21
  }
21
22
  /** Rotate a shape around an axis. Angle is in degrees. Returns a new shape. */
@@ -28,10 +29,10 @@ function rotate(shape, angle, position = [
28
29
  0,
29
30
  1
30
31
  ]) {
31
- const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
32
+ const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
32
33
  const { shape: resultShape, evolution } = require_shapeTypes.getKernel().rotateWithHistory(shape.wrapped, angle * require_constants.DEG2RAD, inputFaceHashes, require_constants.HASH_CODE_MAX, direction, position);
33
34
  const result = require_shapeTypes.castResultShape(resultShape);
34
- require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
35
+ require_booleanFns.propagateAllMetadata(evolution, [shape], result);
35
36
  return result;
36
37
  }
37
38
  /** Mirror a shape through a plane defined by origin and normal. Returns a new shape. */
@@ -44,10 +45,10 @@ function mirror(shape, planeNormal = [
44
45
  0,
45
46
  0
46
47
  ]) {
47
- const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
48
+ const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
48
49
  const { shape: resultShape, evolution } = require_shapeTypes.getKernel().mirrorWithHistory(shape.wrapped, planeOrigin, planeNormal, inputFaceHashes, require_constants.HASH_CODE_MAX);
49
50
  const result = require_shapeTypes.castResultShape(resultShape);
50
- require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
51
+ require_booleanFns.propagateAllMetadata(evolution, [shape], result);
51
52
  return result;
52
53
  }
53
54
  /** Scale a shape uniformly. Returns a new shape. */
@@ -56,10 +57,10 @@ function scale(shape, factor, center = [
56
57
  0,
57
58
  0
58
59
  ]) {
59
- const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
60
+ const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
60
61
  const { shape: resultShape, evolution } = require_shapeTypes.getKernel().scaleWithHistory(shape.wrapped, center, factor, inputFaceHashes, require_constants.HASH_CODE_MAX);
61
62
  const result = require_shapeTypes.castResultShape(resultShape);
62
- require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
63
+ require_booleanFns.propagateAllMetadata(evolution, [shape], result);
63
64
  return result;
64
65
  }
65
66
  /** Resize a shape to exact target dimensions with optional auto-proportional scaling. */
@@ -167,16 +168,16 @@ function applyMatrix(shape, matrix) {
167
168
  const d = det3x3(linear);
168
169
  if (Math.abs(d) < 1e-12) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.VALIDATION_FAILED, "applyMatrix: singular matrix (determinant ≈ 0). Cannot apply a non-invertible transform."));
169
170
  if (isOrthogonalMatrix(linear)) {
170
- const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
171
+ const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
171
172
  const { shape: resultShape, evolution } = require_shapeTypes.getKernel().generalTransformWithHistory(shape.wrapped, linear, translation, true, inputFaceHashes, require_constants.HASH_CODE_MAX);
172
173
  const result = require_shapeTypes.castResultShape(resultShape);
173
- require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
174
+ require_booleanFns.propagateAllMetadata(evolution, [shape], result);
174
175
  return require_errors.ok(result);
175
176
  }
176
177
  /* v8 ignore start -- untestable until WASM is rebuilt with BRepBuilderAPI_GTransform */
177
178
  const resultShape = require_shapeTypes.getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation);
178
179
  const result = require_shapeTypes.castResultShape(resultShape);
179
- require_solidBuilders.propagateMetadataByHash([shape], result);
180
+ require_booleanFns.propagateMetadataByHash([shape], result);
180
181
  return require_errors.ok(result);
181
182
  /* v8 ignore stop */
182
183
  }
@@ -244,7 +245,7 @@ function locate(shape, placement) {
244
245
  } finally {
245
246
  _usingCtx$2.d();
246
247
  }
247
- if (require_solidBuilders.hasAnyMetadata(shape)) require_solidBuilders.propagateMetadataThroughRelocation(shape, moved);
248
+ if (require_booleanFns.hasAnyMetadata(shape)) require_booleanFns.propagateMetadataThroughRelocation(shape, moved);
248
249
  return moved;
249
250
  } catch (cause) {
250
251
  if (moved !== void 0) try {
@@ -264,10 +265,10 @@ function locate(shape, placement) {
264
265
  * Much faster than separate clone() + translate() + rotate() calls.
265
266
  */
266
267
  function transformCopy(shape, composed) {
267
- const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
268
+ const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
268
269
  const { shape: resultShape, evolution } = require_shapeTypes.getKernel().applyComposedTransformWithHistory(shape.wrapped, composed.trsf, inputFaceHashes, require_constants.HASH_CODE_MAX);
269
270
  const result = require_shapeTypes.castResultShape(resultShape);
270
- require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
271
+ require_booleanFns.propagateAllMetadata(evolution, [shape], result);
271
272
  return result;
272
273
  }
273
274
  // src/topology/primitiveFns.ts
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
1
+ const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
- const require_measureFns = require("./measureFns-BdSjw5fr.cjs");
6
+ const require_measureFns = require("./measureFns-DGm6ndQY.cjs");
7
7
  // src/measurement/principalBoxFns.ts
8
8
  /**
9
9
  * Principal-axes bounding box: a solid's extent measured in the frame of its
@@ -1,9 +1,9 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-BNGu103j.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DvzbSivn.js";
2
2
  import { i as wasmIndex } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
4
- import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-CltEv7Pi.js";
4
+ import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-BUzMuIs5.js";
5
5
  import { r as vecCross } from "./vecOps-S-m9H_fe.js";
6
- import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-BrdCH4cH.js";
6
+ import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-C3TZ5Fj9.js";
7
7
  // src/measurement/principalBoxFns.ts
8
8
  /**
9
9
  * Principal-axes bounding box: a solid's extent measured in the frame of its
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-BAtzhCYM.cjs");
2
+ const require_cameraFns = require("./cameraFns-hXUKJkLg.cjs");
3
3
  exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
4
4
  exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
5
5
  exports.cameraLookAt = require_cameraFns.cameraLookAt;
@@ -1 +1 @@
1
- export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-BVWyAscu.js";
1
+ export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-DIbua1lC.js";
package/dist/query.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_helpers = require("./helpers-BdGGaLhF.cjs");
3
- const require_cornerFinder = require("./cornerFinder-e4Wc7_yp.cjs");
2
+ const require_helpers = require("./helpers-Wnq-YPWv.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-ByBGU0r7.cjs");
4
4
  exports.cornerFinder = require_cornerFinder.cornerFinder;
5
5
  exports.edgeFinder = require_helpers.edgeFinder;
6
6
  exports.faceFinder = require_helpers.faceFinder;
package/dist/query.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DpGcM2qZ.js";
2
- import { t as cornerFinder } from "./cornerFinder-Dv_2rmaY.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CroIo2SI.js";
2
+ import { t as cornerFinder } from "./cornerFinder-BYDkloVc.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
3
- const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
1
+ const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
3
+ const require_faceFns = require("./faceFns-BDqVGEoB.cjs");
4
4
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
5
- const require_shapeFns = require("./shapeFns-SgIrOjN4.cjs");
6
- const require_measureFns = require("./measureFns-BdSjw5fr.cjs");
7
- const require_adjacencyFns = require("./adjacencyFns-mMmTBUBY.cjs");
5
+ const require_shapeFns = require("./shapeFns-DuxfaqTw.cjs");
6
+ const require_measureFns = require("./measureFns-DGm6ndQY.cjs");
7
+ const require_adjacencyFns = require("./adjacencyFns-CfhGIMeR.cjs");
8
8
  // src/topology/shapeRef/scoring.ts
9
9
  /**
10
10
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,10 +1,10 @@
1
- import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-BNGu103j.js";
2
- import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-CltEv7Pi.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Q87HCJrp.js";
1
+ import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-DvzbSivn.js";
2
+ import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-BUzMuIs5.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-D4cDeMRf.js";
4
4
  import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
5
- import { n as getHashCode } from "./shapeFns-CZ6VF1yd.js";
6
- import { n as measureArea, s as measureLength } from "./measureFns-BrdCH4cH.js";
7
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-hMihivxC.js";
5
+ import { n as getHashCode } from "./shapeFns-CYjU8PsF.js";
6
+ import { n as measureArea, s as measureLength } from "./measureFns-C3TZ5Fj9.js";
7
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-1Cmjb2ot.js";
8
8
  // src/topology/shapeRef/scoring.ts
9
9
  /**
10
10
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,6 +1,6 @@
1
- import { q as getKernel } from "./shapeTypes-BNGu103j.js";
1
+ import { q as getKernel } from "./shapeTypes-DvzbSivn.js";
2
2
  import { t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-CltEv7Pi.js";
3
+ import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-BUzMuIs5.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  // src/topology/shapeFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
1
+ const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  // src/topology/shapeFns.ts
6
6
  /**
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_refResolveFns = require("./refResolveFns-DNX0bCrP.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-CFwsYCKA.cjs");
3
3
  exports.assignRoles = require_refResolveFns.assignRoles;
4
4
  exports.captureHint = require_refResolveFns.captureHint;
5
5
  exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
package/dist/shapeRef.js CHANGED
@@ -1 +1 @@
1
- export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-kJg2iCad.js";
1
+ export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-WRcvVhV-.js";
@@ -1,4 +1,4 @@
1
- const require_occtWasmAdapter = require("./occtWasmAdapter-D3qerQTq.cjs");
1
+ const require_occtWasmAdapter = require("./occtWasmAdapter-CZPZnpCe.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  // src/kernel/quality.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-DA7oMgcQ.js";
1
+ import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-EM3EhKwk.js";
2
2
  import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
3
3
  // src/kernel/quality.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_blueprintSketcher = require("./blueprintSketcher-BG--DxWB.cjs");
3
- const require_drawFns = require("./drawFns-d-RvC6u6.cjs");
4
- const require_textBlueprints = require("./textBlueprints-B7Vhr0xu.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-B5CFmhjg.cjs");
3
+ const require_drawFns = require("./drawFns-GwVZX47o.cjs");
4
+ const require_textBlueprints = require("./textBlueprints-B4HzJzZM.cjs");
5
5
  // src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-C1WCI6E0.js";
2
- import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-Cl1i8B_B.js";
3
- import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-CE0oxB43.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-BrGmq-65.js";
2
+ import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-Ch3ah8K9.js";
3
+ import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-plsbHqiI.js";
4
4
  // src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
@@ -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-DvzbSivn.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-BUzMuIs5.js";
3
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
+ import { _ as cast, y as downcast } from "./faceFns-D4cDeMRf.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 };