brepjs 18.78.0 → 18.79.0

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 (79) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{blueprint-BE93BNYE.cjs → blueprint-B59GQsSD.cjs} +5 -5
  4. package/dist/{blueprint-BVe9JU-L.js → blueprint-BQmmwEKa.js} +5 -5
  5. package/dist/{blueprintFns-B_7kKwEZ.cjs → blueprintFns-C1kKA5qn.cjs} +2 -2
  6. package/dist/{blueprintFns-DWinspVK.js → blueprintFns-DSK1nrwo.js} +2 -2
  7. package/dist/{blueprintSketcher-D75tuXkF.cjs → blueprintSketcher-BJPBKhF3.cjs} +3 -3
  8. package/dist/{blueprintSketcher-DL-wgnVs.js → blueprintSketcher-EYqKWQh0.js} +3 -3
  9. package/dist/{boolean2D-C4Txi8U1.cjs → boolean2D-B1Di3Bpn.cjs} +4 -4
  10. package/dist/{boolean2D-OtHT7POp.js → boolean2D-COHH5tLX.js} +4 -4
  11. package/dist/brepjs.cjs +41 -310
  12. package/dist/brepjs.js +25 -298
  13. package/dist/{cameraFns-DCXqzH_m.js → cameraFns-BMrhkkOV.js} +2 -2
  14. package/dist/{cameraFns-DfSRnD1k.cjs → cameraFns-BZ_8L3gd.cjs} +2 -2
  15. package/dist/core.cjs +1 -1
  16. package/dist/core.js +1 -1
  17. package/dist/{cornerFinder-KuLU-4pQ.cjs → cornerFinder-Ey3oibK1.cjs} +1 -1
  18. package/dist/{cornerFinder-DPkLU1Of.js → cornerFinder-Fi7obttG.js} +1 -1
  19. package/dist/{curveFns-C0oCmjV2.cjs → curveFns-Ca59CNS0.cjs} +1 -1
  20. package/dist/{curveFns-B4KEYU1M.js → curveFns-CoD5E2Vl.js} +1 -1
  21. package/dist/{drawFns-DxjMxRpE.cjs → drawFns-DTpCthM5.cjs} +12 -12
  22. package/dist/{drawFns-C6h_w03r.js → drawFns-D_LwehLr.js} +12 -12
  23. package/dist/{faceFns-p0lyVuyw.cjs → faceFns-0sI6cbHe.cjs} +2 -2
  24. package/dist/{faceFns-BJ2hzXJp.js → faceFns-Cuxdy-7R.js} +2 -2
  25. package/dist/{healingFns-B7dElsC4.cjs → healingFns--PtL9j2K.cjs} +5 -5
  26. package/dist/{healingFns-DS_nK9KF.js → healingFns-Bm-NdBj_.js} +5 -5
  27. package/dist/{helpers-DTBDjbdR.cjs → helpers-B8mE35Fm.cjs} +6 -6
  28. package/dist/{helpers-C78MY-s6.js → helpers-CD8EMZ5l.js} +6 -6
  29. package/dist/{importFns-CUAiLgt_.cjs → importFns-BHEgzDLw.cjs} +2 -2
  30. package/dist/{importFns-Rv22QSn6.js → importFns-vnxBqXwv.js} +2 -2
  31. package/dist/index.d.ts +1 -1
  32. package/dist/io.cjs +2 -2
  33. package/dist/io.js +2 -2
  34. package/dist/kernel/occt/geometryQueryOps.d.ts +1 -1
  35. package/dist/{loftFns-DuxEscJB.js → loftFns-CsHOwded.js} +1 -1
  36. package/dist/{loftFns-DycLH1Pq.cjs → loftFns-DiSsI2PM.cjs} +1 -1
  37. package/dist/{measureFns-C8c6xRUE.js → measureFns-CdcufPNp.js} +3 -3
  38. package/dist/{measureFns-DnxobCbD.cjs → measureFns-nF-OXcDV.cjs} +3 -3
  39. package/dist/measurement.cjs +1 -1
  40. package/dist/measurement.js +1 -1
  41. package/dist/{meshFns-CuYzpojl.js → meshFns-BCgtjlbs.js} +3 -3
  42. package/dist/{meshFns-BawS1xNA.cjs → meshFns-CnckZa6H.cjs} +3 -3
  43. package/dist/operations/jointFns.d.ts +88 -14
  44. package/dist/operations.cjs +13 -2
  45. package/dist/operations.d.ts +1 -0
  46. package/dist/operations.js +3 -3
  47. package/dist/{primitiveFns-BxH5omw3.js → primitiveFns-BSKbI4Kl.js} +5 -5
  48. package/dist/{primitiveFns-JRmXxbRr.cjs → primitiveFns-DEBQdEkG.cjs} +5 -5
  49. package/dist/projection.cjs +1 -1
  50. package/dist/projection.js +1 -1
  51. package/dist/query.cjs +2 -2
  52. package/dist/query.js +2 -2
  53. package/dist/{shapeFns-DZ6poxP7.js → shapeFns-BzlBMNRO.js} +2 -2
  54. package/dist/{shapeFns-D5WNrq3s.cjs → shapeFns-CecvqmYJ.cjs} +2 -2
  55. package/dist/shapeRef.cjs +1 -1
  56. package/dist/shapeRef.js +1 -1
  57. package/dist/{shapeRefFns-BOWP8n4j.cjs → shapeRefFns-BDACYYRr.cjs} +4 -4
  58. package/dist/{shapeRefFns-ClsyeZp4.js → shapeRefFns-CpRRMBKz.js} +4 -4
  59. package/dist/{shapeTypes-CxSqNvHA.cjs → shapeTypes-DWxL75W3.cjs} +4 -9
  60. package/dist/{shapeTypes-CyTY0prh.js → shapeTypes-DfQi9Kvk.js} +4 -9
  61. package/dist/sketching.cjs +3 -3
  62. package/dist/sketching.js +3 -3
  63. package/dist/{solidBuilders-BtEFUFQ9.js → solidBuilders-DnIrQYZd.js} +2 -2
  64. package/dist/{solidBuilders-diw2zyyN.cjs → solidBuilders-osLCTRG0.cjs} +2 -2
  65. package/dist/{surfaceBuilders-CPHOXRLE.cjs → surfaceBuilders-B8aVZamB.cjs} +2 -2
  66. package/dist/{surfaceBuilders-Do0rypyD.js → surfaceBuilders-hTXdNCYm.js} +2 -2
  67. package/dist/text.cjs +2 -2
  68. package/dist/text.js +2 -2
  69. package/dist/{textBlueprints-C3IbySW_.js → textBlueprints-BpqDGwdx.js} +7 -7
  70. package/dist/{textBlueprints-SKuamOmI.cjs → textBlueprints-CI3k7Izc.cjs} +7 -7
  71. package/dist/{textMetrics-Bzbkal_A.cjs → textMetrics-C4RrG9jL.cjs} +1 -1
  72. package/dist/{textMetrics--BwiJH2B.js → textMetrics-kFw-DE2w.js} +1 -1
  73. package/dist/{threadFns-aWgxzqmT.cjs → threadFns-B7a1EVpS.cjs} +503 -5
  74. package/dist/{threadFns-D8-zfJ0b.js → threadFns-Cra0yHSF.js} +420 -6
  75. package/dist/topology.cjs +7 -7
  76. package/dist/topology.js +7 -7
  77. package/dist/{topologyQueryFns-BomrmBie.js → topologyQueryFns-CqjEReSt.js} +1 -1
  78. package/dist/{topologyQueryFns-Dzxrwn-E.cjs → topologyQueryFns-DfOxu8tG.cjs} +1 -1
  79. package/package.json +1 -1
package/dist/2d.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-CxSqNvHA.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-DWxL75W3.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-Dzxrwn-E.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-D75tuXkF.cjs");
6
- const require_blueprint = require("./blueprint-BE93BNYE.cjs");
7
- const require_boolean2D = require("./boolean2D-C4Txi8U1.cjs");
8
- const require_blueprintFns = require("./blueprintFns-B_7kKwEZ.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DfOxu8tG.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-BJPBKhF3.cjs");
6
+ const require_blueprint = require("./blueprint-B59GQsSD.cjs");
7
+ const require_boolean2D = require("./boolean2D-B1Di3Bpn.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-C1kKA5qn.cjs");
9
9
  //#region src/core/curve2dHandle.ts
10
10
  /**
11
11
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
package/dist/2d.js CHANGED
@@ -1,10 +1,10 @@
1
- import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-CyTY0prh.js";
1
+ import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-DfQi9Kvk.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
- import { w as kernelCallRaw } from "./topologyQueryFns-BomrmBie.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-DL-wgnVs.js";
5
- import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-BVe9JU-L.js";
6
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-OtHT7POp.js";
7
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-DWinspVK.js";
3
+ import { w as kernelCallRaw } from "./topologyQueryFns-CqjEReSt.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-EYqKWQh0.js";
5
+ import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-BQmmwEKa.js";
6
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-COHH5tLX.js";
7
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-DSK1nrwo.js";
8
8
  //#region src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
@@ -1,14 +1,14 @@
1
- const require_shapeTypes = require("./shapeTypes-CxSqNvHA.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DWxL75W3.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
6
6
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
7
- const require_faceFns = require("./faceFns-p0lyVuyw.cjs");
8
- const require_curveFns = require("./curveFns-C0oCmjV2.cjs");
7
+ const require_faceFns = require("./faceFns-0sI6cbHe.cjs");
8
+ const require_curveFns = require("./curveFns-Ca59CNS0.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-CPHOXRLE.cjs");
11
- const require_helpers = require("./helpers-DTBDjbdR.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-B8aVZamB.cjs");
11
+ const require_helpers = require("./helpers-B8mE35Fm.cjs");
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,14 +1,14 @@
1
- import { G as unregisterFromCleanup, Q as getKernel2D, U as registerForCleanup, Z as getKernel, a as createEdge, u as createWire } from "./shapeTypes-CyTY0prh.js";
1
+ import { G as unregisterFromCleanup, Q as getKernel2D, U as registerForCleanup, Z as getKernel, a as createEdge, u as createWire } from "./shapeTypes-DfQi9Kvk.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as computationError } from "./errors-DNWJsfVU.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { r as toVec3 } from "./types-D24Y27N0.js";
6
6
  import { r as makePlane } from "./planeOps-DSjjtrjg.js";
7
- import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-BJ2hzXJp.js";
8
- import { p as getOrientation } from "./curveFns-B4KEYU1M.js";
7
+ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-Cuxdy-7R.js";
8
+ import { p as getOrientation } from "./curveFns-CoD5E2Vl.js";
9
9
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-Do0rypyD.js";
11
- import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-C78MY-s6.js";
10
+ import { r as makeFace } from "./surfaceBuilders-hTXdNCYm.js";
11
+ import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-CD8EMZ5l.js";
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,6 +1,6 @@
1
1
  const require_errors = require("./errors-CXJtc4I7.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-D75tuXkF.cjs");
3
- const require_blueprint = require("./blueprint-BE93BNYE.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-BJPBKhF3.cjs");
3
+ const require_blueprint = require("./blueprint-B59GQsSD.cjs");
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-DL-wgnVs.js";
3
- import { t as Blueprint } from "./blueprint-BVe9JU-L.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-EYqKWQh0.js";
3
+ import { t as Blueprint } from "./blueprint-BQmmwEKa.js";
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-CxSqNvHA.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DWxL75W3.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
6
- const require_helpers = require("./helpers-DTBDjbdR.cjs");
7
- const require_blueprint = require("./blueprint-BE93BNYE.cjs");
6
+ const require_helpers = require("./helpers-B8mE35Fm.cjs");
7
+ const require_blueprint = require("./blueprint-B59GQsSD.cjs");
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /** @template T */
10
10
  var FlatQueue = class {
@@ -1,10 +1,10 @@
1
- import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-CyTY0prh.js";
1
+ import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-DfQi9Kvk.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
6
- import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-C78MY-s6.js";
7
- import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-BVe9JU-L.js";
6
+ import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-CD8EMZ5l.js";
7
+ import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-BQmmwEKa.js";
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /** @template T */
10
10
  var FlatQueue = class {
@@ -1,10 +1,10 @@
1
1
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
4
- const require_surfaceBuilders = require("./surfaceBuilders-CPHOXRLE.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-D75tuXkF.cjs");
6
- const require_helpers = require("./helpers-DTBDjbdR.cjs");
7
- const require_blueprint = require("./blueprint-BE93BNYE.cjs");
4
+ const require_surfaceBuilders = require("./surfaceBuilders-B8aVZamB.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-BJPBKhF3.cjs");
6
+ const require_helpers = require("./helpers-B8mE35Fm.cjs");
7
+ const require_blueprint = require("./blueprint-B59GQsSD.cjs");
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -1,10 +1,10 @@
1
1
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
2
  import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
4
- import { v as zip } from "./surfaceBuilders-Do0rypyD.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-DL-wgnVs.js";
6
- import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-C78MY-s6.js";
7
- import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-BVe9JU-L.js";
4
+ import { v as zip } from "./surfaceBuilders-hTXdNCYm.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-EYqKWQh0.js";
6
+ import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-CD8EMZ5l.js";
7
+ import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-BQmmwEKa.js";
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
package/dist/brepjs.cjs CHANGED
@@ -1,36 +1,36 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-SKuamOmI.cjs");
3
- const require_shapeTypes = require("./shapeTypes-CxSqNvHA.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-CI3k7Izc.cjs");
3
+ const require_shapeTypes = require("./shapeTypes-DWxL75W3.cjs");
4
4
  const require_occtWasmAdapter = require("./occtWasmAdapter-W86SRBpi.cjs");
5
5
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
6
6
  const require_errors = require("./errors-CXJtc4I7.cjs");
7
- const require_topologyQueryFns = require("./topologyQueryFns-Dzxrwn-E.cjs");
7
+ const require_topologyQueryFns = require("./topologyQueryFns-DfOxu8tG.cjs");
8
8
  const require_constants = require("./constants-BOVyEYGH.cjs");
9
9
  const require_types = require("./types-KjA8tY4Y.cjs");
10
10
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
11
11
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
12
- const require_faceFns = require("./faceFns-p0lyVuyw.cjs");
13
- const require_shapeFns = require("./shapeFns-D5WNrq3s.cjs");
14
- const require_curveFns = require("./curveFns-C0oCmjV2.cjs");
15
- const require_meshFns = require("./meshFns-BawS1xNA.cjs");
12
+ const require_faceFns = require("./faceFns-0sI6cbHe.cjs");
13
+ const require_shapeFns = require("./shapeFns-CecvqmYJ.cjs");
14
+ const require_curveFns = require("./curveFns-Ca59CNS0.cjs");
15
+ const require_meshFns = require("./meshFns-CnckZa6H.cjs");
16
16
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
17
- const require_surfaceBuilders = require("./surfaceBuilders-CPHOXRLE.cjs");
18
- const require_primitiveFns = require("./primitiveFns-JRmXxbRr.cjs");
19
- const require_healingFns = require("./healingFns-B7dElsC4.cjs");
20
- const require_threadFns = require("./threadFns-aWgxzqmT.cjs");
21
- const require_blueprintSketcher = require("./blueprintSketcher-D75tuXkF.cjs");
22
- const require_helpers = require("./helpers-DTBDjbdR.cjs");
23
- const require_drawFns = require("./drawFns-DxjMxRpE.cjs");
24
- const require_solidBuilders = require("./solidBuilders-diw2zyyN.cjs");
25
- const require_measureFns = require("./measureFns-DnxobCbD.cjs");
26
- const require_cornerFinder = require("./cornerFinder-KuLU-4pQ.cjs");
27
- const require_boolean2D = require("./boolean2D-C4Txi8U1.cjs");
28
- const require_blueprintFns = require("./blueprintFns-B_7kKwEZ.cjs");
29
- const require_importFns = require("./importFns-CUAiLgt_.cjs");
30
- const require_loftFns = require("./loftFns-DycLH1Pq.cjs");
31
- const require_cameraFns = require("./cameraFns-DfSRnD1k.cjs");
32
- const require_textMetrics = require("./textMetrics-Bzbkal_A.cjs");
33
- const require_shapeRefFns = require("./shapeRefFns-BOWP8n4j.cjs");
17
+ const require_surfaceBuilders = require("./surfaceBuilders-B8aVZamB.cjs");
18
+ const require_primitiveFns = require("./primitiveFns-DEBQdEkG.cjs");
19
+ const require_healingFns = require("./healingFns--PtL9j2K.cjs");
20
+ const require_threadFns = require("./threadFns-B7a1EVpS.cjs");
21
+ const require_blueprintSketcher = require("./blueprintSketcher-BJPBKhF3.cjs");
22
+ const require_helpers = require("./helpers-B8mE35Fm.cjs");
23
+ const require_drawFns = require("./drawFns-DTpCthM5.cjs");
24
+ const require_solidBuilders = require("./solidBuilders-osLCTRG0.cjs");
25
+ const require_measureFns = require("./measureFns-nF-OXcDV.cjs");
26
+ const require_cornerFinder = require("./cornerFinder-Ey3oibK1.cjs");
27
+ const require_boolean2D = require("./boolean2D-B1Di3Bpn.cjs");
28
+ const require_blueprintFns = require("./blueprintFns-C1kKA5qn.cjs");
29
+ const require_importFns = require("./importFns-BHEgzDLw.cjs");
30
+ const require_loftFns = require("./loftFns-DiSsI2PM.cjs");
31
+ const require_cameraFns = require("./cameraFns-BZ_8L3gd.cjs");
32
+ const require_textMetrics = require("./textMetrics-C4RrG9jL.cjs");
33
+ const require_shapeRefFns = require("./shapeRefFns-BDACYYRr.cjs");
34
34
  const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
35
35
  //#region src/topology/shapeBooleans.ts
36
36
  var BOPAlgo_GlueShift = 1;
@@ -2132,94 +2132,6 @@ function roof(w, options) {
2132
2132
  }
2133
2133
  }
2134
2134
  //#endregion
2135
- //#region src/utils/quaternion.ts
2136
- function dot$1(a, b) {
2137
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
2138
- }
2139
- function cross$1(a, b) {
2140
- return [
2141
- a[1] * b[2] - a[2] * b[1],
2142
- a[2] * b[0] - a[0] * b[2],
2143
- a[0] * b[1] - a[1] * b[0]
2144
- ];
2145
- }
2146
- function normalize$1(a) {
2147
- const l = Math.hypot(a[0], a[1], a[2]) || 1;
2148
- return [
2149
- a[0] / l,
2150
- a[1] / l,
2151
- a[2] / l
2152
- ];
2153
- }
2154
- /** A unit vector perpendicular to `v` (for the 180°/parallel degenerate cases). */
2155
- function anyPerpendicular$1(v) {
2156
- return normalize$1(cross$1(v, Math.abs(v[0]) < .9 ? [
2157
- 1,
2158
- 0,
2159
- 0
2160
- ] : [
2161
- 0,
2162
- 1,
2163
- 0
2164
- ]));
2165
- }
2166
- /** Rotate vector `v` by quaternion `q`. */
2167
- function quatRotate(q, v) {
2168
- const [w, x, y, z] = q;
2169
- const tx = 2 * (y * v[2] - z * v[1]);
2170
- const ty = 2 * (z * v[0] - x * v[2]);
2171
- const tz = 2 * (x * v[1] - y * v[0]);
2172
- return [
2173
- v[0] + w * tx + (y * tz - z * ty),
2174
- v[1] + w * ty + (z * tx - x * tz),
2175
- v[2] + w * tz + (x * ty - y * tx)
2176
- ];
2177
- }
2178
- /** Quaternion for a rotation of `angle` radians about (unit-normalized) `axis`. */
2179
- function quatFromAxisAngle(axis, angle) {
2180
- const h = angle / 2;
2181
- const s = Math.sin(h);
2182
- const u = normalize$1(axis);
2183
- return [
2184
- Math.cos(h),
2185
- u[0] * s,
2186
- u[1] * s,
2187
- u[2] * s
2188
- ];
2189
- }
2190
- /** Shortest-arc quaternion rotating unit vector `from` onto unit vector `to`. */
2191
- function quatFromTo(from, to) {
2192
- const a = normalize$1(from);
2193
- const b = normalize$1(to);
2194
- const d = dot$1(a, b);
2195
- if (d >= .999999999) return [
2196
- 1,
2197
- 0,
2198
- 0,
2199
- 0
2200
- ];
2201
- if (d <= -.999999999) return quatFromAxisAngle(anyPerpendicular$1(a), Math.PI);
2202
- const c = cross$1(a, b);
2203
- const len = Math.hypot(1 + d, c[0], c[1], c[2]) || 1;
2204
- return [
2205
- (1 + d) / len,
2206
- c[0] / len,
2207
- c[1] / len,
2208
- c[2] / len
2209
- ];
2210
- }
2211
- /** Hamilton product `a ⊗ b` — the rotation that applies `b` first, then `a`. */
2212
- function quatMultiply(a, b) {
2213
- const [aw, ax, ay, az] = a;
2214
- const [bw, bx, by, bz] = b;
2215
- return [
2216
- aw * bw - ax * bx - ay * by - az * bz,
2217
- aw * bx + ax * bw + ay * bz - az * by,
2218
- aw * by - ax * bz + ay * bw + az * bx,
2219
- aw * bz + ax * by - ay * bx + az * bw
2220
- ];
2221
- }
2222
- //#endregion
2223
2135
  //#region src/kernel/solverAdapter.ts
2224
2136
  /**
2225
2137
  * Constraint solver adapter — analytical solver for simple assembly mates.
@@ -2297,12 +2209,12 @@ function anyPerpendicular(v) {
2297
2209
  }
2298
2210
  /** Apply a pose (rotate then translate) to an entity's origin and any directions. */
2299
2211
  function transformEntity(e, pose) {
2300
- const origin = add$1(quatRotate(pose.rotation, e.origin), pose.position);
2212
+ const origin = add$1(require_threadFns.quatRotate(pose.rotation, e.origin), pose.position);
2301
2213
  return {
2302
2214
  type: e.type,
2303
2215
  origin,
2304
- ...e.normal ? { normal: quatRotate(pose.rotation, e.normal) } : {},
2305
- ...e.direction ? { direction: quatRotate(pose.rotation, e.direction) } : {}
2216
+ ...e.normal ? { normal: require_threadFns.quatRotate(pose.rotation, e.normal) } : {},
2217
+ ...e.direction ? { direction: require_threadFns.quatRotate(pose.rotation, e.direction) } : {}
2306
2218
  };
2307
2219
  }
2308
2220
  /**
@@ -2336,12 +2248,12 @@ function solveConcentric(ref, dep) {
2336
2248
  0,
2337
2249
  1
2338
2250
  ];
2339
- const rotation = quatFromTo(dep.direction ?? [
2251
+ const rotation = require_threadFns.quatFromTo(dep.direction ?? [
2340
2252
  0,
2341
2253
  0,
2342
2254
  1
2343
2255
  ], dRef);
2344
- const rotatedOrigin = quatRotate(rotation, dep.origin);
2256
+ const rotatedOrigin = require_threadFns.quatRotate(rotation, dep.origin);
2345
2257
  return {
2346
2258
  position: sub(ref.origin, rotatedOrigin),
2347
2259
  rotation
@@ -2371,7 +2283,7 @@ function solveAngle(ref, dep, angleRad) {
2371
2283
  0,
2372
2284
  0
2373
2285
  ],
2374
- rotation: quatFromAxisAngle(Math.hypot(c[0], c[1], c[2]) < 1e-9 ? anyPerpendicular(nDep) : c, phi - angleRad)
2286
+ rotation: require_threadFns.quatFromAxisAngle(Math.hypot(c[0], c[1], c[2]) < 1e-9 ? anyPerpendicular(nDep) : c, phi - angleRad)
2375
2287
  };
2376
2288
  }
2377
2289
  /** Entity types each positioning constraint requires of (entityA, entityB). */
@@ -2619,191 +2531,6 @@ function solveAssembly(assembly) {
2619
2531
  }
2620
2532
  }
2621
2533
  //#endregion
2622
- //#region src/operations/jointFns.ts
2623
- var DEG2RAD$1 = Math.PI / 180;
2624
- function clamp(value, min, max) {
2625
- return Math.min(max, Math.max(min, value));
2626
- }
2627
- function unit(v) {
2628
- const l = Math.hypot(v[0], v[1], v[2]) || 1;
2629
- return [
2630
- v[0] / l,
2631
- v[1] / l,
2632
- v[2] / l
2633
- ];
2634
- }
2635
- function makeJoint(type, parent, child, axis, opts, defMin, defMax) {
2636
- const a = opts.min ?? defMin;
2637
- const b = opts.max ?? defMax;
2638
- const min = Math.min(a, b);
2639
- const max = Math.max(a, b);
2640
- return {
2641
- type,
2642
- parent,
2643
- child,
2644
- axis: {
2645
- origin: axis.origin,
2646
- direction: unit(axis.direction)
2647
- },
2648
- min,
2649
- max,
2650
- value: clamp(opts.value ?? 0, min, max)
2651
- };
2652
- }
2653
- /** A revolute (hinge) joint — the child rotates about `axis` by `value` degrees. */
2654
- function revoluteJoint(parent, child, axis, opts = {}) {
2655
- return makeJoint("revolute", parent, child, axis, opts, -180, 180);
2656
- }
2657
- /**
2658
- * A prismatic (slider) joint — the child translates along `axis` by `value`
2659
- * units. Only `axis.direction` is used; `axis.origin` is ignored (a pure
2660
- * translation has no anchor point), unlike a revolute joint which rotates about
2661
- * the axis line through `origin`.
2662
- */
2663
- function prismaticJoint(parent, child, axis, opts = {}) {
2664
- return makeJoint("prismatic", parent, child, axis, opts, 0, 100);
2665
- }
2666
- /** Return a copy of `joint` with its drivable parameter set (clamped to range). */
2667
- function setJointValue(joint, value) {
2668
- return {
2669
- ...joint,
2670
- value: clamp(value, joint.min, joint.max)
2671
- };
2672
- }
2673
- /**
2674
- * The child's local rigid transform (relative to the parent) for a joint value.
2675
- * Defaults to the joint's stored value; an explicit value is clamped to range.
2676
- *
2677
- * - **revolute**: rotation of `value` degrees about the axis line. Rotating
2678
- * about a line through `origin` is `p ↦ R·p + (origin − R·origin)`.
2679
- * - **prismatic**: translation of `value` units along the axis direction.
2680
- */
2681
- function jointTransform(joint, value = joint.value) {
2682
- const v = clamp(value, joint.min, joint.max);
2683
- const dir = unit(joint.axis.direction);
2684
- if (joint.type === "prismatic") return {
2685
- position: [
2686
- dir[0] * v,
2687
- dir[1] * v,
2688
- dir[2] * v
2689
- ],
2690
- rotation: [
2691
- 1,
2692
- 0,
2693
- 0,
2694
- 0
2695
- ]
2696
- };
2697
- const rotation = quatFromAxisAngle(dir, v * DEG2RAD$1);
2698
- const o = joint.axis.origin;
2699
- const ro = quatRotate(rotation, o);
2700
- return {
2701
- position: [
2702
- o[0] - ro[0],
2703
- o[1] - ro[1],
2704
- o[2] - ro[2]
2705
- ],
2706
- rotation
2707
- };
2708
- }
2709
- /** Attach a joint to an assembly node. Returns a new node (immutable). */
2710
- function addJoint(assembly, joint) {
2711
- const existing = assembly.joints ?? [];
2712
- return {
2713
- ...assembly,
2714
- joints: [...existing, joint]
2715
- };
2716
- }
2717
- var IDENTITY_POSE = {
2718
- position: [
2719
- 0,
2720
- 0,
2721
- 0
2722
- ],
2723
- rotation: [
2724
- 1,
2725
- 0,
2726
- 0,
2727
- 0
2728
- ]
2729
- };
2730
- /** Compose two poses: the result applies `b` in `a`'s frame (`a ∘ b`). */
2731
- function composePose(a, b) {
2732
- const rb = quatRotate(a.rotation, b.position);
2733
- return {
2734
- position: [
2735
- a.position[0] + rb[0],
2736
- a.position[1] + rb[1],
2737
- a.position[2] + rb[2]
2738
- ],
2739
- rotation: quatMultiply(a.rotation, b.rotation)
2740
- };
2741
- }
2742
- /** Collect every joint attached anywhere in the assembly tree. */
2743
- function collectJoints(assembly) {
2744
- const joints = [];
2745
- require_threadFns.walkAssembly(assembly, (node) => {
2746
- if (node.joints) joints.push(...node.joints);
2747
- });
2748
- return joints;
2749
- }
2750
- /**
2751
- * Forward kinematics: set joint values and propagate world poses down the
2752
- * kinematic chain. Each joint's axis is interpreted in its **parent's** frame,
2753
- * so a child's world pose is `parentWorld ∘ jointTransform(joint, value)`.
2754
- *
2755
- * Bodies not driven by a joint (chain roots) start at the origin. `jointValues`
2756
- * overrides a joint's stored value, keyed by the **child** node name; omitted
2757
- * joints use `joint.value`. Resolution is topological (reuses the Phase-0
2758
- * ordering), so chains of any depth compose. Returns a world pose for every node.
2759
- */
2760
- function forwardKinematics(assembly, jointValues = {}) {
2761
- const joints = [];
2762
- const names = /* @__PURE__ */ new Set();
2763
- require_threadFns.walkAssembly(assembly, (node) => {
2764
- names.add(node.name);
2765
- if (node.joints) joints.push(...node.joints);
2766
- });
2767
- const byChild = /* @__PURE__ */ new Map();
2768
- for (const j of joints) {
2769
- byChild.set(j.child, j);
2770
- names.add(j.parent);
2771
- names.add(j.child);
2772
- }
2773
- const poses = /* @__PURE__ */ new Map();
2774
- for (const name of names) if (!byChild.has(name)) poses.set(name, IDENTITY_POSE);
2775
- const pending = [...joints];
2776
- let progress = true;
2777
- while (progress && pending.length > 0) {
2778
- progress = false;
2779
- for (let i = pending.length - 1; i >= 0; i--) {
2780
- const j = pending[i];
2781
- if (!j) continue;
2782
- const parentPose = poses.get(j.parent);
2783
- if (!parentPose) continue;
2784
- pending.splice(i, 1);
2785
- progress = true;
2786
- if (poses.has(j.child)) continue;
2787
- const value = jointValues[j.child] ?? j.value;
2788
- poses.set(j.child, composePose(parentPose, jointTransform(j, value)));
2789
- }
2790
- }
2791
- for (const j of pending) if (!poses.has(j.child)) poses.set(j.child, IDENTITY_POSE);
2792
- return poses;
2793
- }
2794
- var JOINT_FREEDOM = {
2795
- revolute: 1,
2796
- prismatic: 1
2797
- };
2798
- /**
2799
- * Open-chain mobility — the number of independent degrees of freedom. Each
2800
- * revolute/prismatic joint contributes 1, so for a serial chain this equals the
2801
- * joint count. (Closed-loop Grübler/Kutzbach analysis is future work.)
2802
- */
2803
- function mechanismDOF(assembly) {
2804
- return collectJoints(assembly).reduce((sum, j) => sum + JOINT_FREEDOM[j.type], 0);
2805
- }
2806
- //#endregion
2807
2534
  //#region src/measurement/interferenceFns.ts
2808
2535
  /**
2809
2536
  * Interference detection between shapes.
@@ -6602,7 +6329,7 @@ exports.Sketcher = require_drawFns.Sketcher;
6602
6329
  exports.Sketches = require_textBlueprints.Sketches;
6603
6330
  exports.addChild = require_threadFns.addChild;
6604
6331
  exports.addHoles = require_primitiveFns.addHoles;
6605
- exports.addJoint = addJoint;
6332
+ exports.addJoint = require_threadFns.addJoint;
6606
6333
  exports.addMate = addMate;
6607
6334
  exports.addStep = require_threadFns.addStep;
6608
6335
  exports.adjacentFaces = require_healingFns.adjacentFaces;
@@ -6726,6 +6453,7 @@ exports.cutAllBisect = require_healingFns.cutAllBisect;
6726
6453
  exports.cutBlueprints = require_boolean2D.cutBlueprints;
6727
6454
  exports.cutWithEvolution = require_healingFns.cutWithEvolution;
6728
6455
  exports.cylinder = require_primitiveFns.cylinder;
6456
+ exports.cylindricalJoint = require_threadFns.cylindricalJoint;
6729
6457
  exports.defaultScorer = require_shapeRefFns.defaultScorer;
6730
6458
  exports.dequeueTask = require_workerHandler.dequeueTask;
6731
6459
  exports.describe = describe;
@@ -6799,7 +6527,7 @@ exports.flatten = require_errors.flatten;
6799
6527
  exports.flipFaceOrientation = require_faceFns.flipFaceOrientation;
6800
6528
  exports.flipOrientation = require_curveFns.flipOrientation;
6801
6529
  exports.fontMetrics = require_textMetrics.fontMetrics;
6802
- exports.forwardKinematics = forwardKinematics;
6530
+ exports.forwardKinematics = require_threadFns.forwardKinematics;
6803
6531
  exports.fromBREP = fromBREP$1;
6804
6532
  exports.fromKernelDir = fromKernelDir;
6805
6533
  exports.fromKernelPnt = fromKernelPnt;
@@ -6922,7 +6650,7 @@ exports.iterSolids = require_topologyQueryFns.iterSolids;
6922
6650
  exports.iterTopo = require_faceFns.iterTopo;
6923
6651
  exports.iterVertices = require_topologyQueryFns.iterVertices;
6924
6652
  exports.iterWires = require_topologyQueryFns.iterWires;
6925
- exports.jointTransform = jointTransform;
6653
+ exports.jointTransform = require_threadFns.jointTransform;
6926
6654
  exports.kernelCall = require_topologyQueryFns.kernelCall;
6927
6655
  exports.kernelCallRaw = require_topologyQueryFns.kernelCallRaw;
6928
6656
  exports.kernelCallScoped = require_topologyQueryFns.kernelCallScoped;
@@ -6961,7 +6689,7 @@ Object.defineProperty(exports, "measurement", {
6961
6689
  return measurement_exports;
6962
6690
  }
6963
6691
  });
6964
- exports.mechanismDOF = mechanismDOF;
6692
+ exports.mechanismDOF = require_threadFns.mechanismDOF;
6965
6693
  exports.mesh = mesh;
6966
6694
  exports.meshEdges = meshEdges;
6967
6695
  exports.meshMultiLOD = require_meshFns.meshMultiLOD;
@@ -7001,6 +6729,7 @@ exports.pendingCount = require_workerHandler.pendingCount;
7001
6729
  exports.pipeline = require_errors.pipeline;
7002
6730
  exports.pivotPlane = require_planeOps.pivotPlane;
7003
6731
  exports.planarFace = require_shapeTypes.planarFace;
6732
+ exports.planarJoint = require_threadFns.planarJoint;
7004
6733
  exports.planarWire = require_shapeTypes.planarWire;
7005
6734
  exports.planetPlacements = planetPlacements;
7006
6735
  exports.pocket = pocket;
@@ -7018,7 +6747,7 @@ Object.defineProperty(exports, "primitives", {
7018
6747
  return primitives_exports;
7019
6748
  }
7020
6749
  });
7021
- exports.prismaticJoint = prismaticJoint;
6750
+ exports.prismaticJoint = require_threadFns.prismaticJoint;
7022
6751
  exports.projectEdges = require_cameraFns.projectEdges;
7023
6752
  exports.projectPointOnFace = require_faceFns.projectPointOnFace;
7024
6753
  Object.defineProperty(exports, "query", {
@@ -7050,7 +6779,7 @@ exports.resolveDirection = require_types.resolveDirection;
7050
6779
  exports.resolvePlane = require_planeOps.resolvePlane;
7051
6780
  exports.resolveRef = require_shapeRefFns.resolveRef;
7052
6781
  exports.reverseCurve = require_blueprintFns.reverseCurve;
7053
- exports.revoluteJoint = revoluteJoint;
6782
+ exports.revoluteJoint = require_threadFns.revoluteJoint;
7054
6783
  exports.revolve = revolve;
7055
6784
  exports.roof = roof;
7056
6785
  exports.rotate = rotate;
@@ -7079,7 +6808,8 @@ exports.sdfTorus = torus;
7079
6808
  exports.section = section;
7080
6809
  exports.sectionToFace = sectionToFace;
7081
6810
  exports.serializeHistory = require_threadFns.serializeHistory;
7082
- exports.setJointValue = setJointValue;
6811
+ exports.setJointValue = require_threadFns.setJointValue;
6812
+ exports.setJointValues = require_threadFns.setJointValues;
7083
6813
  exports.setShapeOrigin = require_shapeFns.setShapeOrigin;
7084
6814
  exports.setTagMetadata = require_shapeFns.setTagMetadata;
7085
6815
  exports.sewShells = require_primitiveFns.sewShells;
@@ -7115,6 +6845,7 @@ exports.solid = require_primitiveFns.solid;
7115
6845
  exports.solidFromShell = require_healingFns.solidFromShell;
7116
6846
  exports.solveAssembly = solveAssembly;
7117
6847
  exports.sphere = require_primitiveFns.sphere;
6848
+ exports.sphericalJoint = require_threadFns.sphericalJoint;
7118
6849
  exports.split = split;
7119
6850
  exports.stepCount = require_threadFns.stepCount;
7120
6851
  exports.stepsFrom = require_threadFns.stepsFrom;