brepjs 20.0.0 → 20.0.1

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 (82) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-DkWknlaR.js → adjacencyFns-BOBaGnQ-.js} +2 -2
  4. package/dist/{adjacencyFns-Cdat1ofi.cjs → adjacencyFns-lCrjQUQr.cjs} +2 -2
  5. package/dist/{blueprint-DOwwe5gw.cjs → blueprint-C8-OnlmZ.cjs} +5 -5
  6. package/dist/{blueprint-22kW0ICa.js → blueprint-DlFhP2Qh.js} +5 -5
  7. package/dist/{blueprintFns-Bwi75Szr.js → blueprintFns-BniwPQ5Y.js} +2 -2
  8. package/dist/{blueprintFns-DRTfqZsZ.cjs → blueprintFns-CnbCEsbH.cjs} +2 -2
  9. package/dist/{blueprintSketcher-CxxS52ZI.cjs → blueprintSketcher-DooDamYd.cjs} +3 -3
  10. package/dist/{blueprintSketcher-DW3WMfm2.js → blueprintSketcher-kSDNNuEJ.js} +3 -3
  11. package/dist/{boolean2D-DLe9jy53.js → boolean2D-B7qLwMXL.js} +4 -4
  12. package/dist/{boolean2D-BYHxSbDH.cjs → boolean2D-DWWRN2RX.cjs} +4 -4
  13. package/dist/brepjs.cjs +28 -28
  14. package/dist/brepjs.js +28 -28
  15. package/dist/{cameraFns-DCUsH23g.cjs → cameraFns-DHCT80lC.cjs} +3 -3
  16. package/dist/{cameraFns-DtaivMYa.js → cameraFns-npky8h1N.js} +3 -3
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-B6L3zTOA.js → cornerFinder-CEarkgO9.js} +1 -1
  20. package/dist/{cornerFinder-DIewkspO.cjs → cornerFinder-Dy1lzQTB.cjs} +1 -1
  21. package/dist/{curveFns-C0zENjCi.js → curveFns-n7htUStC.js} +1 -1
  22. package/dist/{curveFns-1e6j5nXW.cjs → curveFns-qVcljEvc.cjs} +1 -1
  23. package/dist/{drawFns-BUB7YeKu.js → drawFns-CBSjbn4X.js} +12 -12
  24. package/dist/{drawFns-Cu61XWtX.cjs → drawFns-VAreKNtB.cjs} +12 -12
  25. package/dist/{faceFns-Qo7nIMc6.js → faceFns-CQyNJard.js} +2 -2
  26. package/dist/{faceFns-BinRdCKC.cjs → faceFns-s7QRCW8A.cjs} +2 -2
  27. package/dist/{healingFns--idy5knW.js → healingFns-C1Vwru9B.js} +4 -4
  28. package/dist/{healingFns-K2mKlcGA.cjs → healingFns-CDmIZyqk.cjs} +4 -4
  29. package/dist/{helpers-CavGK8r0.cjs → helpers-BSo7hpSE.cjs} +6 -6
  30. package/dist/{helpers-CT29THg0.js → helpers-DVdxPyq2.js} +6 -6
  31. package/dist/{importFns-rCT3bzrO.js → importFns-BU_WjaNS.js} +2 -2
  32. package/dist/{importFns-B3-31QaN.cjs → importFns-BjV9G5z6.cjs} +2 -2
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/occt/booleanOps.d.ts +9 -1
  36. package/dist/{loftFns-ByrWfSBX.js → loftFns-DDdoMjxj.js} +1 -1
  37. package/dist/{loftFns-BigHFXTf.cjs → loftFns-suyWruNr.cjs} +1 -1
  38. package/dist/{measureFns-CLsw9fTy.cjs → measureFns-DLTeuGwQ.cjs} +3 -3
  39. package/dist/{measureFns-BfkCmmb-.js → measureFns-DMr_rq2J.js} +3 -3
  40. package/dist/measurement.cjs +1 -1
  41. package/dist/measurement.js +1 -1
  42. package/dist/{meshFns-1SLb656s.cjs → meshFns-Crgr_uib.cjs} +3 -3
  43. package/dist/{meshFns-CkvvMsIk.js → meshFns-qV2fL7DY.js} +3 -3
  44. package/dist/operations.cjs +2 -2
  45. package/dist/operations.js +2 -2
  46. package/dist/{originTrackingFns-CLSjfAXP.js → originTrackingFns-BbRMIrPd.js} +2 -2
  47. package/dist/{originTrackingFns-q7xmSJHd.cjs → originTrackingFns-CIXgTLuX.cjs} +2 -2
  48. package/dist/{primitiveFns-CQy3iiv_.js → primitiveFns-CM-WtrDU.js} +4 -4
  49. package/dist/{primitiveFns-DwuH8FF1.cjs → primitiveFns-DHTDymOR.cjs} +4 -4
  50. package/dist/projection.cjs +1 -1
  51. package/dist/projection.js +1 -1
  52. package/dist/query.cjs +2 -2
  53. package/dist/query.js +2 -2
  54. package/dist/{refResolveFns-DjmIp8gz.js → refResolveFns-Caq9pEFX.js} +6 -6
  55. package/dist/{refResolveFns-C16KmO4z.cjs → refResolveFns-W0eI7vrV.cjs} +6 -6
  56. package/dist/{shapeFns-KcSNOAAv.cjs → shapeFns-DnTR5fGL.cjs} +2 -2
  57. package/dist/{shapeFns-C3EC8Fqp.js → shapeFns-abxGUiRi.js} +2 -2
  58. package/dist/shapeRef.cjs +1 -1
  59. package/dist/shapeRef.js +1 -1
  60. package/dist/{shapeTypes-DweqaALJ.cjs → shapeTypes-D6N6FPC9.cjs} +67 -75
  61. package/dist/{shapeTypes-BTaEiG1y.js → shapeTypes-DgcXaWoK.js} +67 -75
  62. package/dist/sketching.cjs +3 -3
  63. package/dist/sketching.js +3 -3
  64. package/dist/{solidBuilders-2Ho4kcPL.js → solidBuilders-DCVpjCr4.js} +5 -5
  65. package/dist/{solidBuilders-BeumT5UD.cjs → solidBuilders-DnUQIIh-.cjs} +5 -5
  66. package/dist/{surfaceBuilders-DjhGZZvn.cjs → surfaceBuilders-DZ4qaEMP.cjs} +3 -3
  67. package/dist/{surfaceBuilders-COaytSqx.js → surfaceBuilders-wEh6hNcZ.js} +3 -3
  68. package/dist/text.cjs +2 -2
  69. package/dist/text.js +2 -2
  70. package/dist/{textBlueprints-Twdvzb1E.js → textBlueprints-CJyJx8VV.js} +7 -7
  71. package/dist/{textBlueprints-I09VlWfS.cjs → textBlueprints-Cx7nEADC.cjs} +7 -7
  72. package/dist/{textMetrics-B8De13Tj.cjs → textMetrics-C7yaPJuS.cjs} +1 -1
  73. package/dist/{textMetrics-H5m5OzGy.js → textMetrics-ZDLgofee.js} +1 -1
  74. package/dist/{threadFns-Wqbi-SRj.js → threadFns-Dnr7QEbq.js} +7 -7
  75. package/dist/{threadFns-CMhXBzUL.cjs → threadFns-xQF8IS-h.cjs} +7 -7
  76. package/dist/topology.cjs +9 -9
  77. package/dist/topology.js +9 -9
  78. package/dist/{topologyQueryFns-Cqb0bLW1.cjs → topologyQueryFns-DhWju_Rg.cjs} +1 -1
  79. package/dist/{topologyQueryFns-Dsdk7qnz.js → topologyQueryFns-gVaVV1Nt.js} +1 -1
  80. package/dist/{validityTypes-9nuI6V2T.cjs → validityTypes-Bh3tqEzS.cjs} +1 -1
  81. package/dist/{validityTypes-DzFB9IQW.js → validityTypes-swMGQ5f2.js} +1 -1
  82. package/package.json +13 -13
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Cqb0bLW1.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DhWju_Rg.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
6
- const require_faceFns = require("./faceFns-BinRdCKC.cjs");
7
- const require_shapeFns = require("./shapeFns-KcSNOAAv.cjs");
8
- const require_curveFns = require("./curveFns-1e6j5nXW.cjs");
9
- const require_measureFns = require("./measureFns-CLsw9fTy.cjs");
6
+ const require_faceFns = require("./faceFns-s7QRCW8A.cjs");
7
+ const require_shapeFns = require("./shapeFns-DnTR5fGL.cjs");
8
+ const require_curveFns = require("./curveFns-qVcljEvc.cjs");
9
+ const require_measureFns = require("./measureFns-DLTeuGwQ.cjs");
10
10
  //#region src/utils/vec2d.ts
11
11
  /** Precision for curve intersection and parameter operations. */
12
12
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,12 +1,12 @@
1
- import { q as getKernel, y as isFace } from "./shapeTypes-BTaEiG1y.js";
1
+ import { q as getKernel, y as isFace } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { E as ok, g as err, o as queryError, x as isOk } from "./errors-CTn8i3lY.js";
3
- import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-Dsdk7qnz.js";
3
+ import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-gVaVV1Nt.js";
4
4
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
6
- import { l as normalAt, s as getSurfaceType } from "./faceFns-Qo7nIMc6.js";
7
- import { a as isSameShape, n as getHashCode } from "./shapeFns-C3EC8Fqp.js";
8
- import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-C0zENjCi.js";
9
- import { n as measureArea } from "./measureFns-BfkCmmb-.js";
6
+ import { l as normalAt, s as getSurfaceType } from "./faceFns-CQyNJard.js";
7
+ import { a as isSameShape, n as getHashCode } from "./shapeFns-abxGUiRi.js";
8
+ import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-n7htUStC.js";
9
+ import { n as measureArea } from "./measureFns-DMr_rq2J.js";
10
10
  //#region src/utils/vec2d.ts
11
11
  /** Precision for curve intersection and parameter operations. */
12
12
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,8 +1,8 @@
1
- import { n as castResultShape, q as getKernel } from "./shapeTypes-BTaEiG1y.js";
1
+ import { n as castResultShape, q as getKernel } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { i as wasmIndex, r as vec3At$1 } from "./bug-BdOHwn_e.js";
3
3
  import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
4
4
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
5
- import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-22kW0ICa.js";
5
+ import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-DlFhP2Qh.js";
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_bug = require("./bug-O02CsAmt.cjs");
3
3
  const require_errors = require("./errors-DWezb9DI.cjs");
4
4
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
5
- const require_blueprint = require("./blueprint-DOwwe5gw.cjs");
5
+ const require_blueprint = require("./blueprint-C8-OnlmZ.cjs");
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
package/dist/io.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_meshFns = require("./meshFns-1SLb656s.cjs");
3
- const require_importFns = require("./importFns-B3-31QaN.cjs");
2
+ const require_meshFns = require("./meshFns-Crgr_uib.cjs");
3
+ const require_importFns = require("./importFns-BjV9G5z6.cjs");
4
4
  exports.blueprintToDXF = require_importFns.blueprintToDXF;
5
5
  exports.exportDXF = require_importFns.exportDXF;
6
6
  exports.exportGlb = require_importFns.exportGlb;
package/dist/io.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-CkvvMsIk.js";
2
- import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-rCT3bzrO.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-qV2fL7DY.js";
2
+ import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-BU_WjaNS.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -1,4 +1,12 @@
1
- import { BooleanOpType, CheckBooleanResult, KernelInstance, KernelShape, BooleanOptions } from '../types.js';
1
+ import { BooleanOpType, CheckBooleanResult, KernelInstance, KernelShape, KernelType, BooleanOptions } from '../types.js';
2
+ /**
3
+ * Construct a two-operand boolean with its operands set but not yet built.
4
+ *
5
+ * The `BRepAlgoAPI_*_3(shape, tool, progress)` constructors run the boolean
6
+ * immediately, and `Build()` clears and recomputes it, so building one of those
7
+ * again computed every boolean twice. Apply glue/OBB/fuzzy, then build once.
8
+ */
9
+ export declare function newTwoOperandBoolean(oc: KernelInstance, kind: 'Fuse' | 'Cut' | 'Common', shape: KernelShape, tool: KernelShape): KernelType;
2
10
  /**
3
11
  * Applies glue optimization to a boolean operation builder.
4
12
  */
@@ -1,4 +1,4 @@
1
- import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-BTaEiG1y.js";
1
+ import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
3
  import { r as toVec3 } from "./types-D24Y27N0.js";
4
4
  import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
3
  const require_types = require("./types-KjA8tY4Y.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Cqb0bLW1.cjs");
4
- const require_faceFns = require("./faceFns-BinRdCKC.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DhWju_Rg.cjs");
4
+ const require_faceFns = require("./faceFns-s7QRCW8A.cjs");
5
5
  //#region src/measurement/measureCache.ts
6
6
  var cache = /* @__PURE__ */ new WeakMap();
7
7
  function getCachedMeasurement(shape, key) {
@@ -1,7 +1,7 @@
1
- import { q as getKernel } from "./shapeTypes-BTaEiG1y.js";
1
+ import { q as getKernel } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
- import { T as kernelCallRaw } from "./topologyQueryFns-Dsdk7qnz.js";
4
- import { m as uvBounds } from "./faceFns-Qo7nIMc6.js";
3
+ import { T as kernelCallRaw } from "./topologyQueryFns-gVaVV1Nt.js";
4
+ import { m as uvBounds } from "./faceFns-CQyNJard.js";
5
5
  //#region src/measurement/measureCache.ts
6
6
  var cache = /* @__PURE__ */ new WeakMap();
7
7
  function getCachedMeasurement(shape, key) {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_measureFns = require("./measureFns-CLsw9fTy.cjs");
2
+ const require_measureFns = require("./measureFns-DLTeuGwQ.cjs");
3
3
  exports.createDistanceQuery = require_measureFns.createDistanceQuery;
4
4
  exports.measureArea = require_measureFns.measureArea;
5
5
  exports.measureDistance = require_measureFns.measureDistance;
@@ -1,2 +1,2 @@
1
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-BfkCmmb-.js";
1
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-DMr_rq2J.js";
2
2
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Cqb0bLW1.cjs");
4
- const require_originTrackingFns = require("./originTrackingFns-q7xmSJHd.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DhWju_Rg.cjs");
4
+ const require_originTrackingFns = require("./originTrackingFns-CIXgTLuX.cjs");
5
5
  //#region src/topology/meshCache.ts
6
6
  /**
7
7
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,7 +1,7 @@
1
- import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-BTaEiG1y.js";
1
+ import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { E as ok, g as err, r as ioError } from "./errors-CTn8i3lY.js";
3
- import { d as getSolids, n as getBounds } from "./topologyQueryFns-Dsdk7qnz.js";
4
- import { t as getFaceOrigins } from "./originTrackingFns-CLSjfAXP.js";
3
+ import { d as getSolids, n as getBounds } from "./topologyQueryFns-gVaVV1Nt.js";
4
+ import { t as getFaceOrigins } from "./originTrackingFns-BbRMIrPd.js";
5
5
  //#region src/topology/meshCache.ts
6
6
  /**
7
7
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_threadFns = require("./threadFns-CMhXBzUL.cjs");
3
- const require_loftFns = require("./loftFns-BigHFXTf.cjs");
2
+ const require_threadFns = require("./threadFns-xQF8IS-h.cjs");
3
+ const require_loftFns = require("./loftFns-suyWruNr.cjs");
4
4
  exports.addChild = require_threadFns.addChild;
5
5
  exports.addJoint = require_threadFns.addJoint;
6
6
  exports.addStep = require_threadFns.addStep;
@@ -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-Wqbi-SRj.js";
2
- import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-ByrWfSBX.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-Dnr7QEbq.js";
2
+ import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-DDdoMjxj.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,5 +1,5 @@
1
- import { q as getKernel } from "./shapeTypes-BTaEiG1y.js";
2
- import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-Dsdk7qnz.js";
1
+ import { q as getKernel } from "./shapeTypes-DgcXaWoK.js";
2
+ import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-gVaVV1Nt.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
4
4
  //#region src/topology/metadata/originTrackingFns.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-Cqb0bLW1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-DhWju_Rg.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
4
  //#region src/topology/metadata/originTrackingFns.ts
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-BTaEiG1y.js";
1
+ import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
- import { n as isClosedWire } from "./validityTypes-DzFB9IQW.js";
3
+ import { n as isClosedWire } from "./validityTypes-swMGQ5f2.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
- import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, 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, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-2Ho4kcPL.js";
6
- 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-COaytSqx.js";
5
+ import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, 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, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-DCVpjCr4.js";
6
+ 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-wEh6hNcZ.js";
7
7
  //#region src/topology/transformFns.ts
8
8
  /**
9
9
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_validityTypes = require("./validityTypes-9nuI6V2T.cjs");
3
+ const require_validityTypes = require("./validityTypes-Bh3tqEzS.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
- const require_solidBuilders = require("./solidBuilders-BeumT5UD.cjs");
6
- const require_surfaceBuilders = require("./surfaceBuilders-DjhGZZvn.cjs");
5
+ const require_solidBuilders = require("./solidBuilders-DnUQIIh-.cjs");
6
+ const require_surfaceBuilders = require("./surfaceBuilders-DZ4qaEMP.cjs");
7
7
  //#region src/topology/transformFns.ts
8
8
  /**
9
9
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-DCUsH23g.cjs");
2
+ const require_cameraFns = require("./cameraFns-DHCT80lC.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,2 +1,2 @@
1
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-DtaivMYa.js";
1
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-npky8h1N.js";
2
2
  export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
package/dist/query.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_helpers = require("./helpers-CavGK8r0.cjs");
3
- const require_cornerFinder = require("./cornerFinder-DIewkspO.cjs");
2
+ const require_helpers = require("./helpers-BSo7hpSE.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-Dy1lzQTB.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-CT29THg0.js";
2
- import { t as cornerFinder } from "./cornerFinder-B6L3zTOA.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DVdxPyq2.js";
2
+ import { t as cornerFinder } from "./cornerFinder-CEarkgO9.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,9 +1,9 @@
1
- import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-BTaEiG1y.js";
2
- import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-Dsdk7qnz.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Qo7nIMc6.js";
4
- import { n as getHashCode } from "./shapeFns-C3EC8Fqp.js";
5
- import { n as measureArea, s as measureLength } from "./measureFns-BfkCmmb-.js";
6
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-DkWknlaR.js";
1
+ import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-DgcXaWoK.js";
2
+ import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-gVaVV1Nt.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-CQyNJard.js";
4
+ import { n as getHashCode } from "./shapeFns-abxGUiRi.js";
5
+ import { n as measureArea, s as measureLength } from "./measureFns-DMr_rq2J.js";
6
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-BOBaGnQ-.js";
7
7
  //#region src/topology/shapeRef/scoring.ts
8
8
  /**
9
9
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-Cqb0bLW1.cjs");
3
- const require_faceFns = require("./faceFns-BinRdCKC.cjs");
4
- const require_shapeFns = require("./shapeFns-KcSNOAAv.cjs");
5
- const require_measureFns = require("./measureFns-CLsw9fTy.cjs");
6
- const require_adjacencyFns = require("./adjacencyFns-Cdat1ofi.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-DhWju_Rg.cjs");
3
+ const require_faceFns = require("./faceFns-s7QRCW8A.cjs");
4
+ const require_shapeFns = require("./shapeFns-DnTR5fGL.cjs");
5
+ const require_measureFns = require("./measureFns-DLTeuGwQ.cjs");
6
+ const require_adjacencyFns = require("./adjacencyFns-lCrjQUQr.cjs");
7
7
  //#region src/topology/shapeRef/scoring.ts
8
8
  /**
9
9
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-DweqaALJ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D6N6FPC9.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Cqb0bLW1.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DhWju_Rg.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  //#region src/topology/shapeFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { q as getKernel } from "./shapeTypes-BTaEiG1y.js";
1
+ import { q as getKernel } from "./shapeTypes-DgcXaWoK.js";
2
2
  import { t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
- import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-Dsdk7qnz.js";
3
+ import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-gVaVV1Nt.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
5
  //#region 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-C16KmO4z.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-W0eI7vrV.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,2 +1,2 @@
1
- import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-DjmIp8gz.js";
1
+ import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-Caq9pEFX.js";
2
2
  export { assignRoles, captureHint, createDerivedFaceRef, createEdgeRef, createRef, createVertexRef, defaultScorer, isDerivedFaceRef, isEdgeRef, isFaceRef, isLineageRef, isVertexRef, resolveDerivedFaceRef, resolveEdgeRef, resolveLineageRef, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, updateRoles };
@@ -529,6 +529,33 @@ function makeTopologyOps$2(oc) {
529
529
  /** Tolerance passed to OCCT SimplifyResult (ShapeUpgrade_UnifySameDomain). */
530
530
  var SIMPLIFY_TOLERANCE = .001;
531
531
  /**
532
+ * Construct a two-operand boolean with its operands set but not yet built.
533
+ *
534
+ * The `BRepAlgoAPI_*_3(shape, tool, progress)` constructors run the boolean
535
+ * immediately, and `Build()` clears and recomputes it, so building one of those
536
+ * again computed every boolean twice. Apply glue/OBB/fuzzy, then build once.
537
+ */
538
+ function newTwoOperandBoolean(oc, kind, shape, tool) {
539
+ const op = kind === "Fuse" ? new oc.BRepAlgoAPI_Fuse_1() : kind === "Cut" ? new oc.BRepAlgoAPI_Cut_1() : new oc.BRepAlgoAPI_Common_1();
540
+ let args;
541
+ let tools;
542
+ try {
543
+ args = new oc.TopTools_ListOfShape_1();
544
+ tools = new oc.TopTools_ListOfShape_1();
545
+ args.Append_1(shape);
546
+ tools.Append_1(tool);
547
+ op.SetArguments(args);
548
+ op.SetTools(tools);
549
+ } catch (e) {
550
+ op.delete();
551
+ throw e;
552
+ } finally {
553
+ args?.delete();
554
+ tools?.delete();
555
+ }
556
+ return op;
557
+ }
558
+ /**
532
559
  * Applies glue optimization to a boolean operation builder.
533
560
  */
534
561
  function applyGlue(oc, op, optimisation) {
@@ -588,67 +615,44 @@ function buildCompound(oc, shapes) {
588
615
  return compound;
589
616
  }
590
617
  /**
591
- * Fuses two shapes together.
618
+ * Runs a two-operand boolean with the given options, releasing the op and its
619
+ * progress range on every path.
592
620
  */
593
- function fuse$1(oc, shape, tool, options = {}) {
621
+ function runTwoOperandBoolean(oc, kind, shape, tool, options) {
594
622
  const end = perfTimer("boolean");
623
+ const { optimisation, simplify = false, fuzzyValue } = options;
624
+ const progress = new oc.Message_ProgressRange_1();
625
+ let op;
595
626
  try {
596
- const { optimisation, simplify = false, fuzzyValue } = options;
597
- const progress = new oc.Message_ProgressRange_1();
598
- const fuseOp = new oc.BRepAlgoAPI_Fuse_3(shape, tool, progress);
599
- applyGlue(oc, fuseOp, optimisation);
600
- applyBooleanDefaults(fuseOp, fuzzyValue);
601
- fuseOp.Build(progress);
602
- if (simplify) fuseOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
603
- const result = fuseOp.Shape();
604
- fuseOp.delete();
605
- progress.delete();
606
- return result;
627
+ op = newTwoOperandBoolean(oc, kind, shape, tool);
628
+ applyGlue(oc, op, optimisation);
629
+ applyBooleanDefaults(op, fuzzyValue);
630
+ op.Build(progress);
631
+ if (simplify) op.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
632
+ return op.Shape();
607
633
  } finally {
634
+ op?.delete();
635
+ progress.delete();
608
636
  end();
609
637
  }
610
638
  }
611
639
  /**
640
+ * Fuses two shapes together.
641
+ */
642
+ function fuse$1(oc, shape, tool, options = {}) {
643
+ return runTwoOperandBoolean(oc, "Fuse", shape, tool, options);
644
+ }
645
+ /**
612
646
  * Cuts a tool shape from a base shape.
613
647
  */
614
648
  function cut$1(oc, shape, tool, options = {}) {
615
- const end = perfTimer("boolean");
616
- try {
617
- const { optimisation, simplify = false, fuzzyValue } = options;
618
- const progress = new oc.Message_ProgressRange_1();
619
- const cutOp = new oc.BRepAlgoAPI_Cut_3(shape, tool, progress);
620
- applyGlue(oc, cutOp, optimisation);
621
- applyBooleanDefaults(cutOp, fuzzyValue);
622
- cutOp.Build(progress);
623
- if (simplify) cutOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
624
- const result = cutOp.Shape();
625
- cutOp.delete();
626
- progress.delete();
627
- return result;
628
- } finally {
629
- end();
630
- }
649
+ return runTwoOperandBoolean(oc, "Cut", shape, tool, options);
631
650
  }
632
651
  /**
633
652
  * Intersects two shapes.
634
653
  */
635
654
  function intersect$1(oc, shape, tool, options = {}) {
636
- const end = perfTimer("boolean");
637
- try {
638
- const { optimisation, simplify = false, fuzzyValue } = options;
639
- const progress = new oc.Message_ProgressRange_1();
640
- const commonOp = new oc.BRepAlgoAPI_Common_3(shape, tool, progress);
641
- applyGlue(oc, commonOp, optimisation);
642
- applyBooleanDefaults(commonOp, fuzzyValue);
643
- commonOp.Build(progress);
644
- if (simplify) commonOp.SimplifyResult(true, true, SIMPLIFY_TOLERANCE);
645
- const result = commonOp.Shape();
646
- commonOp.delete();
647
- progress.delete();
648
- return result;
649
- } finally {
650
- end();
651
- }
655
+ return runTwoOperandBoolean(oc, "Common", shape, tool, options);
652
656
  }
653
657
  /**
654
658
  * Sections a shape with another shape (typically a planar face), returning
@@ -3507,41 +3511,29 @@ function extractDiagnostics(op) {
3507
3511
  messages: []
3508
3512
  };
3509
3513
  }
3510
- function fuseWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
3514
+ function twoOperandBooleanWithHistory(oc, kind, shape, tool, inputFaceHashes, hashUpperBound, options) {
3511
3515
  const progress = new oc.Message_ProgressRange_1();
3512
- const fuseOp = new oc.BRepAlgoAPI_Fuse_3(shape, tool, progress);
3513
- applyGlue(oc, fuseOp, options.optimisation);
3514
- applyBooleanDefaults(fuseOp, options.fuzzyValue);
3515
- fuseOp.Build(progress);
3516
- const diagnostics = extractDiagnostics(fuseOp);
3517
- const result = booleanWithEvolution(oc, fuseOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
3518
- fuseOp.delete();
3519
- progress.delete();
3520
- return result;
3516
+ let op;
3517
+ try {
3518
+ op = newTwoOperandBoolean(oc, kind, shape, tool);
3519
+ applyGlue(oc, op, options.optimisation);
3520
+ applyBooleanDefaults(op, options.fuzzyValue);
3521
+ op.Build(progress);
3522
+ const diagnostics = extractDiagnostics(op);
3523
+ return booleanWithEvolution(oc, op, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
3524
+ } finally {
3525
+ op?.delete();
3526
+ progress.delete();
3527
+ }
3528
+ }
3529
+ function fuseWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
3530
+ return twoOperandBooleanWithHistory(oc, "Fuse", shape, tool, inputFaceHashes, hashUpperBound, options);
3521
3531
  }
3522
3532
  function cutWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
3523
- const progress = new oc.Message_ProgressRange_1();
3524
- const cutOp = new oc.BRepAlgoAPI_Cut_3(shape, tool, progress);
3525
- applyGlue(oc, cutOp, options.optimisation);
3526
- applyBooleanDefaults(cutOp, options.fuzzyValue);
3527
- cutOp.Build(progress);
3528
- const diagnostics = extractDiagnostics(cutOp);
3529
- const result = booleanWithEvolution(oc, cutOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
3530
- cutOp.delete();
3531
- progress.delete();
3532
- return result;
3533
+ return twoOperandBooleanWithHistory(oc, "Cut", shape, tool, inputFaceHashes, hashUpperBound, options);
3533
3534
  }
3534
3535
  function intersectWithHistory$1(oc, shape, tool, inputFaceHashes, hashUpperBound, options = {}) {
3535
- const progress = new oc.Message_ProgressRange_1();
3536
- const intOp = new oc.BRepAlgoAPI_Common_3(shape, tool, progress);
3537
- applyGlue(oc, intOp, options.optimisation);
3538
- applyBooleanDefaults(intOp, options.fuzzyValue);
3539
- intOp.Build(progress);
3540
- const diagnostics = extractDiagnostics(intOp);
3541
- const result = booleanWithEvolution(oc, intOp, [shape, tool], inputFaceHashes, hashUpperBound, options.simplify ?? false, diagnostics);
3542
- intOp.delete();
3543
- progress.delete();
3544
- return result;
3536
+ return twoOperandBooleanWithHistory(oc, "Common", shape, tool, inputFaceHashes, hashUpperBound, options);
3545
3537
  }
3546
3538
  function filletWithHistory$1(oc, shape, edges, radius, inputFaceHashes, hashUpperBound) {
3547
3539
  const builder = new oc.BRepFilletAPI_MakeFillet(shape, oc.ChFi3d_FilletShape.ChFi3d_Rational);