brepjs 20.12.11 → 20.12.13

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 (91) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-DfPO5LGP.js → adjacencyFns-DBN26xm_.js} +2 -2
  4. package/dist/{adjacencyFns-DSGyqGyy.cjs → adjacencyFns-Djv832MP.cjs} +2 -2
  5. package/dist/{blueprint-DbNFPHzC.js → blueprint-BTccTqFy.js} +5 -5
  6. package/dist/{blueprint-BY2aygt_.cjs → blueprint-nVQsEilp.cjs} +5 -5
  7. package/dist/{blueprintFns-AfHtvBKP.cjs → blueprintFns-DFDOgqqe.cjs} +2 -2
  8. package/dist/{blueprintFns-dU5V5WcD.js → blueprintFns-DX7yLZpR.js} +2 -2
  9. package/dist/{blueprintSketcher-DHp6AeEM.cjs → blueprintSketcher-CoGp1dM9.cjs} +3 -3
  10. package/dist/{blueprintSketcher-nBI9PlsW.js → blueprintSketcher-rk64lh8e.js} +3 -3
  11. package/dist/{boolean2D-C6TS6oFP.cjs → boolean2D-DP2DiMfT.cjs} +4 -4
  12. package/dist/{boolean2D-DuWgyjOR.js → boolean2D-Dv-57m9d.js} +4 -4
  13. package/dist/{booleanFns-BwzBRGqj.js → booleanFns-CjIZaNBh.js} +59 -33
  14. package/dist/{booleanFns-D0qfjH0a.cjs → booleanFns-ewBwy7V_.cjs} +64 -32
  15. package/dist/brepjs.cjs +30 -30
  16. package/dist/brepjs.js +30 -30
  17. package/dist/{cameraFns-CLkNCsYU.js → cameraFns-D0JDXxwO.js} +3 -3
  18. package/dist/{cameraFns-B9xKg36U.cjs → cameraFns-DmIQsPIr.cjs} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-Da8Dv4bp.cjs → cornerFinder-CZ1XbVx7.cjs} +1 -1
  22. package/dist/{cornerFinder-CeyQ5JMA.js → cornerFinder-Df7ajnlz.js} +1 -1
  23. package/dist/{curveFns-EsJgIpc6.js → curveFns-CUrIF9LG.js} +1 -1
  24. package/dist/{curveFns-B8mm5cou.cjs → curveFns-DK5eG57I.cjs} +1 -1
  25. package/dist/{drawFns-JZV96JGO.cjs → drawFns-B2CPxqd1.cjs} +12 -12
  26. package/dist/{drawFns-BQIHgHQg.js → drawFns-BKKWQ4JW.js} +12 -12
  27. package/dist/{faceFns-2jGPfqvB.js → faceFns-B3vblI_s.js} +2 -2
  28. package/dist/{faceFns-Jo9hMVqL.cjs → faceFns-C1Ii1MJ-.cjs} +2 -2
  29. package/dist/{healingFns-D6mUhe0Z.js → healingFns-CqiHrJcx.js} +114 -29
  30. package/dist/{healingFns-qioD81Of.cjs → healingFns-sfguIlrW.cjs} +114 -29
  31. package/dist/{helpers-BvYkHZK7.cjs → helpers-CTxyRIoE.cjs} +6 -6
  32. package/dist/{helpers-CsHdKbfF.js → helpers-Dy1moMMd.js} +6 -6
  33. package/dist/{importFns-C8yUNPzJ.js → importFns-BXiAHbyn.js} +5 -5
  34. package/dist/{importFns-BzzUvnKA.cjs → importFns-C3ILnGTv.cjs} +5 -5
  35. package/dist/io.cjs +2 -2
  36. package/dist/io.js +2 -2
  37. package/dist/{loftFns-jnQL_zpD.js → loftFns-BJqF1p_f.js} +1 -1
  38. package/dist/{loftFns-CnerVgTM.cjs → loftFns-CzERU_TY.cjs} +1 -1
  39. package/dist/{measureFns-D3egqKcW.js → measureFns-CT2TRojo.js} +15 -9
  40. package/dist/{measureFns-R85865k9.cjs → measureFns-DN5YMfKZ.cjs} +26 -8
  41. package/dist/measurement/measureFns.d.ts +18 -3
  42. package/dist/measurement/principalBoxFns.d.ts +2 -1
  43. package/dist/measurement.cjs +2 -2
  44. package/dist/measurement.js +2 -2
  45. package/dist/{meshFns-Cs_qrlXI.cjs → meshFns-BDn_nIVv.cjs} +3 -3
  46. package/dist/{meshFns-Bo4EQJFO.js → meshFns-Cp8uEpVt.js} +3 -3
  47. package/dist/operations.cjs +2 -2
  48. package/dist/operations.js +2 -2
  49. package/dist/{primitiveFns-eiM6OjWU.cjs → primitiveFns-1FcmvZ6Y.cjs} +5 -5
  50. package/dist/{primitiveFns-NxbTqKy7.js → primitiveFns-BzJi89Y6.js} +5 -5
  51. package/dist/{principalBoxFns-DepJW5im.cjs → principalBoxFns-DT4ngNuy.cjs} +29 -20
  52. package/dist/{principalBoxFns-BgetPvvQ.js → principalBoxFns-farY7tvh.js} +29 -20
  53. package/dist/projection.cjs +1 -1
  54. package/dist/projection.js +1 -1
  55. package/dist/query.cjs +2 -2
  56. package/dist/query.js +2 -2
  57. package/dist/{refResolveFns-DpWvqRm0.cjs → refResolveFns-By31fyEv.cjs} +6 -6
  58. package/dist/{refResolveFns-Bl10yOGJ.js → refResolveFns-dNAt7W9t.js} +6 -6
  59. package/dist/{shapeFns-kFm-m8jh.js → shapeFns-381QqZ8n.js} +2 -2
  60. package/dist/{shapeFns-D47cmLG8.cjs → shapeFns-DhTfkxbN.cjs} +2 -2
  61. package/dist/shapeRef.cjs +1 -1
  62. package/dist/shapeRef.js +1 -1
  63. package/dist/{shapeTypes-C06KHgTm.cjs → shapeTypes-C0NcoN5g.cjs} +11 -14
  64. package/dist/{shapeTypes-DoPnZHn_.js → shapeTypes-DfBx__EF.js} +11 -14
  65. package/dist/sketching.cjs +3 -3
  66. package/dist/sketching.js +3 -3
  67. package/dist/{solidBuilders-ZDGdvaTU.js → solidBuilders-BZ1qXlFZ.js} +3 -3
  68. package/dist/{solidBuilders-Dwm0hXn5.cjs → solidBuilders-VPkj5ChQ.cjs} +3 -3
  69. package/dist/{surfaceBuilders-D5kFAV1i.cjs → surfaceBuilders-DQre19g8.cjs} +3 -3
  70. package/dist/{surfaceBuilders-BBs6D6Km.js → surfaceBuilders-sBre5aYy.js} +3 -3
  71. package/dist/text.cjs +2 -2
  72. package/dist/text.js +2 -2
  73. package/dist/{textBlueprints-D3XhH1kb.cjs → textBlueprints-ChDNr0L4.cjs} +8 -8
  74. package/dist/{textBlueprints-BvZNjVwM.js → textBlueprints-DCorV4gM.js} +8 -8
  75. package/dist/{textMetrics-BGPUxjiq.js → textMetrics-ByzyMC1I.js} +1 -1
  76. package/dist/{textMetrics-zk48vXsM.cjs → textMetrics-C0qTX3sH.cjs} +1 -1
  77. package/dist/{threadFns-CEr8JDsu.js → threadFns-AJP69FU6.js} +7 -7
  78. package/dist/{threadFns-DNFoBBrH.cjs → threadFns-CzWqzDN_.cjs} +7 -7
  79. package/dist/topology/apiTypes.d.ts +4 -2
  80. package/dist/topology/booleanFns.d.ts +15 -3
  81. package/dist/topology/chamferAngleFns.d.ts +6 -4
  82. package/dist/topology/evolutionFns.d.ts +2 -0
  83. package/dist/topology/metadata/metadataPropagation.d.ts +4 -1
  84. package/dist/topology/modifierFns.d.ts +8 -0
  85. package/dist/topology.cjs +9 -9
  86. package/dist/topology.js +9 -9
  87. package/dist/{topologyQueryFns-yOGEI9hO.js → topologyQueryFns-CTCsQIH_.js} +1 -1
  88. package/dist/{topologyQueryFns-BUhKY2Kj.cjs → topologyQueryFns-svM8Yfsk.cjs} +1 -1
  89. package/dist/{validityTypes-lfyOkCQm.cjs → validityTypes-BCUWXQNA.cjs} +1 -1
  90. package/dist/{validityTypes-CGrEOscY.js → validityTypes-DrWg6_qM.js} +1 -1
  91. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-CEr8JDsu.js";
2
- import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-jnQL_zpD.js";
1
+ import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-AJP69FU6.js";
2
+ import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-BJqF1p_f.js";
3
3
  export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -1,11 +1,11 @@
1
- const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-lfyOkCQm.cjs");
3
+ const require_validityTypes = require("./validityTypes-BCUWXQNA.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-Dwm0hXn5.cjs");
7
- const require_booleanFns = require("./booleanFns-D0qfjH0a.cjs");
8
- const require_surfaceBuilders = require("./surfaceBuilders-D5kFAV1i.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-VPkj5ChQ.cjs");
7
+ const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
8
+ const require_surfaceBuilders = require("./surfaceBuilders-DQre19g8.cjs");
9
9
  // src/topology/transformFns.ts
10
10
  /**
11
11
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,11 +1,11 @@
1
- import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DoPnZHn_.js";
1
+ import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DfBx__EF.js";
2
2
  import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { n as isClosedWire } from "./validityTypes-CGrEOscY.js";
3
+ import { n as isClosedWire } from "./validityTypes-DrWg6_qM.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
5
5
  import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
6
- import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-ZDGdvaTU.js";
7
- import { d as collectInputFaceHashes, f as hasAnyMetadata, h as propagateMetadataThroughRelocation, m as propagateMetadataByHash, p as propagateAllMetadata } from "./booleanFns-BwzBRGqj.js";
8
- import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-BBs6D6Km.js";
6
+ import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-BZ1qXlFZ.js";
7
+ import { f as collectInputFaceHashes, g as propagateMetadataThroughRelocation, h as propagateMetadataByHash, m as propagateAllMetadata, p as hasAnyMetadata } from "./booleanFns-CjIZaNBh.js";
8
+ import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-sBre5aYy.js";
9
9
  // src/topology/transformFns.ts
10
10
  /**
11
11
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.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-BUhKY2Kj.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
- const require_measureFns = require("./measureFns-R85865k9.cjs");
6
+ const require_measureFns = require("./measureFns-DN5YMfKZ.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
@@ -27,9 +27,9 @@ function validatePrincipalBoxInput(shape) {
27
27
  if (kernel.isNull(shape.wrapped)) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NULL_SHAPE_INPUT, "principalBoundingBox: shape is a null shape"));
28
28
  const type = kernel.shapeType(shape.wrapped);
29
29
  if (type !== "solid" && type !== "compsolid" && type !== "compound") return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NOT_A_SOLID, `principalBoundingBox: expected a solid, got a ${type}`, void 0, { shapeType: type }, "Use getBounds() for faces, wires, and shells"));
30
- const volume = require_topologyQueryFns.kernelCallRaw(() => type === "solid" || require_topologyQueryFns.subShapeCount(shape, "solid") > 0 ? kernel.volume(shape.wrapped) : 0, require_errors.BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure volume");
31
- if (!volume.ok) return volume;
32
- if (volume.value <= ZERO_VOLUME_TOLERANCE) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.ZERO_VOLUME, "principalBoundingBox: shape encloses no volume", void 0, { volume: volume.value }, "Use getBounds() for shapes without volume, or build a solid first"));
30
+ }
31
+ function zeroVolumeErr(volume) {
32
+ return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.ZERO_VOLUME, "principalBoundingBox: shape encloses no volume", void 0, { volume }, "Use getBounds() for shapes without volume, or build a solid first"));
33
33
  }
34
34
  /** One cyclic-Jacobi rotation that zeroes `a[p][q]`, accumulated into the eigenvector matrix `v`. */
35
35
  function jacobiRotate(a, v, p, q) {
@@ -113,12 +113,12 @@ function withoutNegativeZero(v) {
113
113
  v[2] + 0
114
114
  ];
115
115
  }
116
- function boundsInFrame(shape, axes) {
116
+ function boundsInFrame(target, axes) {
117
117
  try {
118
118
  var _usingCtx$1 = require_shapeTypes._usingCtx();
119
119
  const kernel = require_shapeTypes.getKernel();
120
120
  const [a0, a1, a2] = axes;
121
- const framed = _usingCtx$1.u(require_shapeTypes.castResultShape(kernel.generalTransform(shape.wrapped, [
121
+ const framed = _usingCtx$1.u(require_shapeTypes.castResultShape(kernel.generalTransform(target, [
122
122
  ...a0,
123
123
  ...a1,
124
124
  ...a2
@@ -158,6 +158,21 @@ function assembleBox(axes, bounds) {
158
158
  ]
159
159
  };
160
160
  }
161
+ /** The principal box of `target`, a solid, a compsolid, or a compound of solids. */
162
+ function principalBoxOf(target) {
163
+ const kernel = require_shapeTypes.getKernel();
164
+ const volume = require_topologyQueryFns.kernelCallRaw(() => kernel.volume(target), require_errors.BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure volume");
165
+ if (!volume.ok) return volume;
166
+ if (volume.value <= ZERO_VOLUME_TOLERANCE) return zeroVolumeErr(volume.value);
167
+ const inertiaOf = kernel.inertia?.bind(kernel);
168
+ if (!inertiaOf) return require_errors.err(require_errors.unsupportedError(require_errors.BrepErrorCode.UNSUPPORTED_CAPABILITY, `principalBoundingBox: the ${kernel.kernelId} kernel has no inertia query`, void 0, { kernel: kernel.kernelId }, "Use the occt-wasm kernel, which provides the inertia query"));
169
+ const inertia = require_topologyQueryFns.kernelCallRaw(() => inertiaOf(target), require_errors.BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to compute the matrix of inertia");
170
+ if (!inertia.ok) return inertia;
171
+ const axes = principalAxes(inertia.value);
172
+ const bounds = require_topologyQueryFns.kernelCallRaw(() => boundsInFrame(target, axes), require_errors.BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure bounds in the principal frame");
173
+ if (!bounds.ok) return bounds;
174
+ return require_errors.ok(assembleBox(axes, bounds.value));
175
+ }
161
176
  /**
162
177
  * Measure a solid's bounding box on its principal axes of inertia.
163
178
  *
@@ -172,7 +187,8 @@ function assembleBox(axes, bounds) {
172
187
  * Z reports 136.6 x 136.6 x 2, because any in-plane pair of axes is principal
173
188
  * for a square plate.
174
189
  *
175
- * @param shape - A solid, compsolid, or compound containing solids.
190
+ * @param shape - A solid, compsolid, or compound containing solids. A compound
191
+ * is measured by its solids alone: loose faces, shells, or wires in it are ignored.
176
192
  * @returns `Result` with the box center in world coordinates, orthonormal
177
193
  * right-handed axes ordered by decreasing extent, and the full edge lengths
178
194
  * along those axes. Fails with `NOT_A_SOLID` for any other shape type
@@ -191,17 +207,10 @@ function principalBoundingBox(shape) {
191
207
  if (cached) return require_errors.ok(cached);
192
208
  const invalid = validatePrincipalBoxInput(shape);
193
209
  if (invalid) return invalid;
194
- const kernel = require_shapeTypes.getKernel();
195
- const inertiaOf = kernel.inertia?.bind(kernel);
196
- if (!inertiaOf) return require_errors.err(require_errors.unsupportedError(require_errors.BrepErrorCode.UNSUPPORTED_CAPABILITY, `principalBoundingBox: the ${kernel.kernelId} kernel has no inertia query`, void 0, { kernel: kernel.kernelId }, "Use the occt-wasm kernel, which provides the inertia query"));
197
- const inertia = require_topologyQueryFns.kernelCallRaw(() => inertiaOf(shape.wrapped), require_errors.BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to compute the matrix of inertia");
198
- if (!inertia.ok) return inertia;
199
- const axes = principalAxes(inertia.value);
200
- const bounds = require_topologyQueryFns.kernelCallRaw(() => boundsInFrame(shape, axes), require_errors.BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure bounds in the principal frame");
201
- if (!bounds.ok) return bounds;
202
- const result = assembleBox(axes, bounds.value);
203
- require_measureFns.setCachedMeasurement(shape.wrapped, "principal", result);
204
- return require_errors.ok(result);
210
+ const result = require_shapeTypes.getKernel().shapeType(shape.wrapped) === "compound" ? require_measureFns.withSubShapes(shape, "solid", (solids) => solids.length === 0 ? zeroVolumeErr(0) : require_measureFns.withCompoundOf(solids, principalBoxOf)) : principalBoxOf(shape.wrapped);
211
+ if (!result.ok) return result;
212
+ require_measureFns.setCachedMeasurement(shape.wrapped, "principal", result.value);
213
+ return result;
205
214
  }
206
215
  Object.defineProperty(exports, "principalBoundingBox", {
207
216
  enumerable: true,
@@ -1,9 +1,9 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DoPnZHn_.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DfBx__EF.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-yOGEI9hO.js";
4
+ import { E as kernelCallRaw } from "./topologyQueryFns-CTCsQIH_.js";
5
5
  import { r as vecCross } from "./vecOps-S-m9H_fe.js";
6
- import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-D3egqKcW.js";
6
+ import { f as withCompoundOf, h as setCachedMeasurement, m as getCachedMeasurement, p as withSubShapes } from "./measureFns-CT2TRojo.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
@@ -27,9 +27,9 @@ function validatePrincipalBoxInput(shape) {
27
27
  if (kernel.isNull(shape.wrapped)) return err(validationError(BrepErrorCode.NULL_SHAPE_INPUT, "principalBoundingBox: shape is a null shape"));
28
28
  const type = kernel.shapeType(shape.wrapped);
29
29
  if (type !== "solid" && type !== "compsolid" && type !== "compound") return err(validationError(BrepErrorCode.NOT_A_SOLID, `principalBoundingBox: expected a solid, got a ${type}`, void 0, { shapeType: type }, "Use getBounds() for faces, wires, and shells"));
30
- const volume = kernelCallRaw(() => type === "solid" || subShapeCount(shape, "solid") > 0 ? kernel.volume(shape.wrapped) : 0, BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure volume");
31
- if (!volume.ok) return volume;
32
- if (volume.value <= ZERO_VOLUME_TOLERANCE) return err(validationError(BrepErrorCode.ZERO_VOLUME, "principalBoundingBox: shape encloses no volume", void 0, { volume: volume.value }, "Use getBounds() for shapes without volume, or build a solid first"));
30
+ }
31
+ function zeroVolumeErr(volume) {
32
+ return err(validationError(BrepErrorCode.ZERO_VOLUME, "principalBoundingBox: shape encloses no volume", void 0, { volume }, "Use getBounds() for shapes without volume, or build a solid first"));
33
33
  }
34
34
  /** One cyclic-Jacobi rotation that zeroes `a[p][q]`, accumulated into the eigenvector matrix `v`. */
35
35
  function jacobiRotate(a, v, p, q) {
@@ -113,12 +113,12 @@ function withoutNegativeZero(v) {
113
113
  v[2] + 0
114
114
  ];
115
115
  }
116
- function boundsInFrame(shape, axes) {
116
+ function boundsInFrame(target, axes) {
117
117
  try {
118
118
  var _usingCtx$1 = _usingCtx();
119
119
  const kernel = getKernel();
120
120
  const [a0, a1, a2] = axes;
121
- const framed = _usingCtx$1.u(castResultShape(kernel.generalTransform(shape.wrapped, [
121
+ const framed = _usingCtx$1.u(castResultShape(kernel.generalTransform(target, [
122
122
  ...a0,
123
123
  ...a1,
124
124
  ...a2
@@ -158,6 +158,21 @@ function assembleBox(axes, bounds) {
158
158
  ]
159
159
  };
160
160
  }
161
+ /** The principal box of `target`, a solid, a compsolid, or a compound of solids. */
162
+ function principalBoxOf(target) {
163
+ const kernel = getKernel();
164
+ const volume = kernelCallRaw(() => kernel.volume(target), BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure volume");
165
+ if (!volume.ok) return volume;
166
+ if (volume.value <= ZERO_VOLUME_TOLERANCE) return zeroVolumeErr(volume.value);
167
+ const inertiaOf = kernel.inertia?.bind(kernel);
168
+ if (!inertiaOf) return err(unsupportedError(BrepErrorCode.UNSUPPORTED_CAPABILITY, `principalBoundingBox: the ${kernel.kernelId} kernel has no inertia query`, void 0, { kernel: kernel.kernelId }, "Use the occt-wasm kernel, which provides the inertia query"));
169
+ const inertia = kernelCallRaw(() => inertiaOf(target), BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to compute the matrix of inertia");
170
+ if (!inertia.ok) return inertia;
171
+ const axes = principalAxes(inertia.value);
172
+ const bounds = kernelCallRaw(() => boundsInFrame(target, axes), BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure bounds in the principal frame");
173
+ if (!bounds.ok) return bounds;
174
+ return ok(assembleBox(axes, bounds.value));
175
+ }
161
176
  /**
162
177
  * Measure a solid's bounding box on its principal axes of inertia.
163
178
  *
@@ -172,7 +187,8 @@ function assembleBox(axes, bounds) {
172
187
  * Z reports 136.6 x 136.6 x 2, because any in-plane pair of axes is principal
173
188
  * for a square plate.
174
189
  *
175
- * @param shape - A solid, compsolid, or compound containing solids.
190
+ * @param shape - A solid, compsolid, or compound containing solids. A compound
191
+ * is measured by its solids alone: loose faces, shells, or wires in it are ignored.
176
192
  * @returns `Result` with the box center in world coordinates, orthonormal
177
193
  * right-handed axes ordered by decreasing extent, and the full edge lengths
178
194
  * along those axes. Fails with `NOT_A_SOLID` for any other shape type
@@ -191,16 +207,9 @@ function principalBoundingBox(shape) {
191
207
  if (cached) return ok(cached);
192
208
  const invalid = validatePrincipalBoxInput(shape);
193
209
  if (invalid) return invalid;
194
- const kernel = getKernel();
195
- const inertiaOf = kernel.inertia?.bind(kernel);
196
- if (!inertiaOf) return err(unsupportedError(BrepErrorCode.UNSUPPORTED_CAPABILITY, `principalBoundingBox: the ${kernel.kernelId} kernel has no inertia query`, void 0, { kernel: kernel.kernelId }, "Use the occt-wasm kernel, which provides the inertia query"));
197
- const inertia = kernelCallRaw(() => inertiaOf(shape.wrapped), BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to compute the matrix of inertia");
198
- if (!inertia.ok) return inertia;
199
- const axes = principalAxes(inertia.value);
200
- const bounds = kernelCallRaw(() => boundsInFrame(shape, axes), BrepErrorCode.PRINCIPAL_BOX_FAILED, "principalBoundingBox: failed to measure bounds in the principal frame");
201
- if (!bounds.ok) return bounds;
202
- const result = assembleBox(axes, bounds.value);
203
- setCachedMeasurement(shape.wrapped, "principal", result);
204
- return ok(result);
210
+ const result = getKernel().shapeType(shape.wrapped) === "compound" ? withSubShapes(shape, "solid", (solids) => solids.length === 0 ? zeroVolumeErr(0) : withCompoundOf(solids, principalBoxOf)) : principalBoxOf(shape.wrapped);
211
+ if (!result.ok) return result;
212
+ setCachedMeasurement(shape.wrapped, "principal", result.value);
213
+ return result;
205
214
  }
206
215
  export { principalBoundingBox as t };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-B9xKg36U.cjs");
2
+ const require_cameraFns = require("./cameraFns-DmIQsPIr.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-CLkNCsYU.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-D0JDXxwO.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-BvYkHZK7.cjs");
3
- const require_cornerFinder = require("./cornerFinder-Da8Dv4bp.cjs");
2
+ const require_helpers = require("./helpers-CTxyRIoE.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-CZ1XbVx7.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-CsHdKbfF.js";
2
- import { t as cornerFinder } from "./cornerFinder-CeyQ5JMA.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-Dy1moMMd.js";
2
+ import { t as cornerFinder } from "./cornerFinder-Df7ajnlz.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
3
- const require_faceFns = require("./faceFns-Jo9hMVqL.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
3
+ const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
4
4
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
5
- const require_shapeFns = require("./shapeFns-D47cmLG8.cjs");
6
- const require_measureFns = require("./measureFns-R85865k9.cjs");
7
- const require_adjacencyFns = require("./adjacencyFns-DSGyqGyy.cjs");
5
+ const require_shapeFns = require("./shapeFns-DhTfkxbN.cjs");
6
+ const require_measureFns = require("./measureFns-DN5YMfKZ.cjs");
7
+ const require_adjacencyFns = require("./adjacencyFns-Djv832MP.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-DoPnZHn_.js";
2
- import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-yOGEI9hO.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-2jGPfqvB.js";
1
+ import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-DfBx__EF.js";
2
+ import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-CTCsQIH_.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-B3vblI_s.js";
4
4
  import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
5
- import { n as getHashCode } from "./shapeFns-kFm-m8jh.js";
6
- import { n as measureArea, s as measureLength } from "./measureFns-D3egqKcW.js";
7
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-DfPO5LGP.js";
5
+ import { n as getHashCode } from "./shapeFns-381QqZ8n.js";
6
+ import { n as measureArea, s as measureLength } from "./measureFns-CT2TRojo.js";
7
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-DBN26xm_.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-DoPnZHn_.js";
1
+ import { q as getKernel } from "./shapeTypes-DfBx__EF.js";
2
2
  import { t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-yOGEI9hO.js";
3
+ import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-CTCsQIH_.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-C06KHgTm.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.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-DpWvqRm0.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-By31fyEv.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-Bl10yOGJ.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-dNAt7W9t.js";
@@ -7498,15 +7498,19 @@ function fillet(bk, shape, edges, radius) {
7498
7498
  }
7499
7499
  return solidHandle(bk.filletVariable(solidId, JSON.stringify(spec)));
7500
7500
  }
7501
+ /** brepkit's two-distance chamfer, bound to `bk`; throws on builds without it. */
7502
+ function requireChamferAsymmetric(bk, what) {
7503
+ if (typeof bk.chamferAsymmetric !== "function") throw new require_occtWasmAdapter.UnsupportedKernelOperationError(`brepkit: ${what} requires chamferAsymmetric, which this brepkit-wasm build lacks`);
7504
+ return bk.chamferAsymmetric.bind(bk);
7505
+ }
7501
7506
  function chamfer(bk, shape, edges, distance) {
7502
7507
  const solidId = unwrapSolidOrThrow(shape, "chamfer");
7503
7508
  const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
7504
7509
  if (typeof distance === "number") return solidHandle(bk.chamfer(solidId, edgeIds, distance));
7505
7510
  if (Array.isArray(distance)) {
7506
7511
  const [d1, d2] = distance;
7507
- if (typeof bk.chamferAsymmetric === "function") return solidHandle(bk.chamferAsymmetric(solidId, edgeIds, d1, d2));
7508
- warnOnce("chamfer-asymmetric", "chamferAsymmetric not available; using averaged distance.");
7509
- return solidHandle(bk.chamfer(solidId, edgeIds, (d1 + d2) / 2));
7512
+ if (d1 === d2) return solidHandle(bk.chamfer(solidId, edgeIds, d1));
7513
+ return solidHandle(requireChamferAsymmetric(bk, "an asymmetric chamfer")(solidId, edgeIds, d1, d2));
7510
7514
  }
7511
7515
  const groups = /* @__PURE__ */ new Map();
7512
7516
  for (const [i, edge] of edges.entries()) {
@@ -7523,22 +7527,15 @@ function chamfer(bk, shape, edges, distance) {
7523
7527
  d2
7524
7528
  });
7525
7529
  }
7530
+ const asymmetric = [...groups.values()].some((g) => g.d1 !== g.d2) ? requireChamferAsymmetric(bk, "an asymmetric chamfer") : void 0;
7526
7531
  let result = solidId;
7527
- for (const group of groups.values()) if (group.d1 === group.d2) result = bk.chamfer(result, group.ids, group.d1);
7528
- else if (typeof bk.chamferAsymmetric === "function") result = bk.chamferAsymmetric(result, group.ids, group.d1, group.d2);
7529
- else {
7530
- warnOnce("chamfer-callback", "chamferAsymmetric not available; asymmetric edges use averaged distance.");
7531
- result = bk.chamfer(result, group.ids, (group.d1 + group.d2) / 2);
7532
- }
7532
+ for (const group of groups.values()) result = asymmetric && group.d1 !== group.d2 ? asymmetric(result, group.ids, group.d1, group.d2) : bk.chamfer(result, group.ids, group.d1);
7533
7533
  return solidHandle(result);
7534
7534
  }
7535
7535
  function chamferDistAngle$1(bk, shape, edges, distance, angleDeg) {
7536
+ const asymmetric = requireChamferAsymmetric(bk, "chamferDistAngle");
7536
7537
  const d2 = distance * Math.tan(angleDeg * Math.PI / 180);
7537
- const solidId = unwrapSolidOrThrow(shape, "chamferDistAngle");
7538
- const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
7539
- if (typeof bk.chamferAsymmetric === "function") return solidHandle(bk.chamferAsymmetric(solidId, edgeIds, distance, d2));
7540
- warnOnce("chamfer-dist-angle", "chamferAsymmetric not available; using averaged distance.");
7541
- return solidHandle(bk.chamfer(solidId, edgeIds, (distance + d2) / 2));
7538
+ return solidHandle(asymmetric(unwrapSolidOrThrow(shape, "chamferDistAngle"), edges.map((e) => unwrap$1(e, "edge")), distance, d2));
7542
7539
  }
7543
7540
  function faceCentroid(bk, faceId) {
7544
7541
  const verts = toArray(bk.getFaceVertices(faceId));
@@ -7498,15 +7498,19 @@ function fillet(bk, shape, edges, radius) {
7498
7498
  }
7499
7499
  return solidHandle(bk.filletVariable(solidId, JSON.stringify(spec)));
7500
7500
  }
7501
+ /** brepkit's two-distance chamfer, bound to `bk`; throws on builds without it. */
7502
+ function requireChamferAsymmetric(bk, what) {
7503
+ if (typeof bk.chamferAsymmetric !== "function") throw new UnsupportedKernelOperationError(`brepkit: ${what} requires chamferAsymmetric, which this brepkit-wasm build lacks`);
7504
+ return bk.chamferAsymmetric.bind(bk);
7505
+ }
7501
7506
  function chamfer(bk, shape, edges, distance) {
7502
7507
  const solidId = unwrapSolidOrThrow(shape, "chamfer");
7503
7508
  const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
7504
7509
  if (typeof distance === "number") return solidHandle(bk.chamfer(solidId, edgeIds, distance));
7505
7510
  if (Array.isArray(distance)) {
7506
7511
  const [d1, d2] = distance;
7507
- if (typeof bk.chamferAsymmetric === "function") return solidHandle(bk.chamferAsymmetric(solidId, edgeIds, d1, d2));
7508
- warnOnce("chamfer-asymmetric", "chamferAsymmetric not available; using averaged distance.");
7509
- return solidHandle(bk.chamfer(solidId, edgeIds, (d1 + d2) / 2));
7512
+ if (d1 === d2) return solidHandle(bk.chamfer(solidId, edgeIds, d1));
7513
+ return solidHandle(requireChamferAsymmetric(bk, "an asymmetric chamfer")(solidId, edgeIds, d1, d2));
7510
7514
  }
7511
7515
  const groups = /* @__PURE__ */ new Map();
7512
7516
  for (const [i, edge] of edges.entries()) {
@@ -7523,22 +7527,15 @@ function chamfer(bk, shape, edges, distance) {
7523
7527
  d2
7524
7528
  });
7525
7529
  }
7530
+ const asymmetric = [...groups.values()].some((g) => g.d1 !== g.d2) ? requireChamferAsymmetric(bk, "an asymmetric chamfer") : void 0;
7526
7531
  let result = solidId;
7527
- for (const group of groups.values()) if (group.d1 === group.d2) result = bk.chamfer(result, group.ids, group.d1);
7528
- else if (typeof bk.chamferAsymmetric === "function") result = bk.chamferAsymmetric(result, group.ids, group.d1, group.d2);
7529
- else {
7530
- warnOnce("chamfer-callback", "chamferAsymmetric not available; asymmetric edges use averaged distance.");
7531
- result = bk.chamfer(result, group.ids, (group.d1 + group.d2) / 2);
7532
- }
7532
+ for (const group of groups.values()) result = asymmetric && group.d1 !== group.d2 ? asymmetric(result, group.ids, group.d1, group.d2) : bk.chamfer(result, group.ids, group.d1);
7533
7533
  return solidHandle(result);
7534
7534
  }
7535
7535
  function chamferDistAngle$1(bk, shape, edges, distance, angleDeg) {
7536
+ const asymmetric = requireChamferAsymmetric(bk, "chamferDistAngle");
7536
7537
  const d2 = distance * Math.tan(angleDeg * Math.PI / 180);
7537
- const solidId = unwrapSolidOrThrow(shape, "chamferDistAngle");
7538
- const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
7539
- if (typeof bk.chamferAsymmetric === "function") return solidHandle(bk.chamferAsymmetric(solidId, edgeIds, distance, d2));
7540
- warnOnce("chamfer-dist-angle", "chamferAsymmetric not available; using averaged distance.");
7541
- return solidHandle(bk.chamfer(solidId, edgeIds, (distance + d2) / 2));
7538
+ return solidHandle(asymmetric(unwrapSolidOrThrow(shape, "chamferDistAngle"), edges.map((e) => unwrap$1(e, "edge")), distance, d2));
7542
7539
  }
7543
7540
  function faceCentroid(bk, faceId) {
7544
7541
  const verts = toArray(bk.getFaceVertices(faceId));
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_blueprintSketcher = require("./blueprintSketcher-DHp6AeEM.cjs");
3
- const require_drawFns = require("./drawFns-JZV96JGO.cjs");
4
- const require_textBlueprints = require("./textBlueprints-D3XhH1kb.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-CoGp1dM9.cjs");
3
+ const require_drawFns = require("./drawFns-B2CPxqd1.cjs");
4
+ const require_textBlueprints = require("./textBlueprints-ChDNr0L4.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-nBI9PlsW.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-BQIHgHQg.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-BvZNjVwM.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-rk64lh8e.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-BKKWQ4JW.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-DCorV4gM.js";
4
4
  // src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
@@ -1,8 +1,8 @@
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-DoPnZHn_.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-DfBx__EF.js";
2
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-yOGEI9hO.js";
3
+ import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-CTCsQIH_.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
- import { _ as cast, y as downcast } from "./faceFns-2jGPfqvB.js";
5
+ import { _ as cast, y as downcast } from "./faceFns-B3vblI_s.js";
6
6
  // src/topology/metadata/originTrackingFns.ts
7
7
  /**
8
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
- const require_faceFns = require("./faceFns-Jo9hMVqL.cjs");
5
+ const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
6
6
  // src/topology/metadata/originTrackingFns.ts
7
7
  /**
8
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-lfyOkCQm.cjs");
4
- const require_faceFns = require("./faceFns-Jo9hMVqL.cjs");
3
+ const require_validityTypes = require("./validityTypes-BCUWXQNA.cjs");
4
+ const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
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
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-DoPnZHn_.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-DfBx__EF.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-CGrEOscY.js";
4
- import { _ as cast, u as outerWire } from "./faceFns-2jGPfqvB.js";
3
+ import { a as isPlanarFace } from "./validityTypes-DrWg6_qM.js";
4
+ import { _ as cast, u as outerWire } from "./faceFns-B3vblI_s.js";
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-D3XhH1kb.cjs");
3
- const require_textMetrics = require("./textMetrics-zk48vXsM.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-ChDNr0L4.cjs");
3
+ const require_textMetrics = require("./textMetrics-C0qTX3sH.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-BvZNjVwM.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BGPUxjiq.js";
1
+ import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DCorV4gM.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-ByzyMC1I.js";
3
3
  export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
@@ -1,20 +1,20 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
- const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-C0NcoN5g.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-Jo9hMVqL.cjs");
10
- const require_solidBuilders = require("./solidBuilders-Dwm0hXn5.cjs");
11
- const require_booleanFns = require("./booleanFns-D0qfjH0a.cjs");
9
+ const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
10
+ const require_solidBuilders = require("./solidBuilders-VPkj5ChQ.cjs");
11
+ const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
12
12
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
13
- const require_curveFns = require("./curveFns-B8mm5cou.cjs");
13
+ const require_curveFns = require("./curveFns-DK5eG57I.cjs");
14
14
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
15
- const require_surfaceBuilders = require("./surfaceBuilders-D5kFAV1i.cjs");
16
- const require_blueprintSketcher = require("./blueprintSketcher-DHp6AeEM.cjs");
17
- const require_loftFns = require("./loftFns-CnerVgTM.cjs");
15
+ const require_surfaceBuilders = require("./surfaceBuilders-DQre19g8.cjs");
16
+ const require_blueprintSketcher = require("./blueprintSketcher-CoGp1dM9.cjs");
17
+ const require_loftFns = require("./loftFns-CzERU_TY.cjs");
18
18
  let opentype_js = require("opentype.js");
19
19
  opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
20
20
  // src/topology/shapeRef/extrudeRoleFns.ts
@@ -1,19 +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-DoPnZHn_.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-DfBx__EF.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-2jGPfqvB.js";
9
- import { o as makeSolid, t as makeCompound } from "./solidBuilders-ZDGdvaTU.js";
10
- import { r as cutAll } from "./booleanFns-BwzBRGqj.js";
8
+ import { v as copyShape } from "./faceFns-B3vblI_s.js";
9
+ import { o as makeSolid, t as makeCompound } from "./solidBuilders-BZ1qXlFZ.js";
10
+ import { i as cutAll } from "./booleanFns-CjIZaNBh.js";
11
11
  import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
12
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-EsJgIpc6.js";
12
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CUrIF9LG.js";
13
13
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
14
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BBs6D6Km.js";
15
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-nBI9PlsW.js";
16
- import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-jnQL_zpD.js";
14
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-sBre5aYy.js";
15
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-rk64lh8e.js";
16
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-BJqF1p_f.js";
17
17
  import opentype from "opentype.js";
18
18
  // src/topology/shapeRef/extrudeRoleFns.ts
19
19
  /** Match tolerance as a fraction of the extrusion's size. */