brepjs 20.13.3 → 20.13.4

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 (83) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-V29Gvfs9.js → adjacencyFns-Ce4lxSWp.js} +2 -2
  4. package/dist/{adjacencyFns-BBugwmvl.cjs → adjacencyFns-DjblerpV.cjs} +2 -2
  5. package/dist/{blueprint-CDmOJybf.js → blueprint-CeIbNzdp.js} +5 -5
  6. package/dist/{blueprint-BO8zuqoy.cjs → blueprint-D4YxCDeX.cjs} +5 -5
  7. package/dist/{blueprintFns-CEKZsu4N.js → blueprintFns-DEeIBzwN.js} +2 -2
  8. package/dist/{blueprintFns-Cki-iwEl.cjs → blueprintFns-fc9ZUSqe.cjs} +2 -2
  9. package/dist/{blueprintSketcher-DG_2zJg7.js → blueprintSketcher-BQ6ApvaQ.js} +3 -3
  10. package/dist/{blueprintSketcher-Bxkp-vjK.cjs → blueprintSketcher-DID7kq5g.cjs} +3 -3
  11. package/dist/{boolean2D-C_sEMz0u.cjs → boolean2D-BsrkJbMe.cjs} +4 -4
  12. package/dist/{boolean2D-DqCcYA2X.js → boolean2D-QMPt29HH.js} +4 -4
  13. package/dist/{booleanFns-CopMFBLS.js → booleanFns-BuxgJmu2.js} +5 -5
  14. package/dist/{booleanFns-CA9tvtqr.cjs → booleanFns-CQIepT9X.cjs} +5 -5
  15. package/dist/brepjs.cjs +29 -29
  16. package/dist/brepjs.js +29 -29
  17. package/dist/{cameraFns-BJ35ht2H.cjs → cameraFns-DL3zo3ol.cjs} +3 -3
  18. package/dist/{cameraFns-BIIpsfds.js → cameraFns-s8km1l0J.js} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-C8VCstc3.js → cornerFinder-D7P4vdaD.js} +1 -1
  22. package/dist/{cornerFinder-D83OLL_I.cjs → cornerFinder-uPZDWiyt.cjs} +1 -1
  23. package/dist/{curveFns--TqXOi8f.js → curveFns-CQtl1RzI.js} +1 -1
  24. package/dist/{curveFns-B29Eot3K.cjs → curveFns-DkG5mlUj.cjs} +1 -1
  25. package/dist/{drawFns-g9FrZ_P4.js → drawFns-BKnz1pa1.js} +12 -12
  26. package/dist/{drawFns-Bqs4HPzo.cjs → drawFns-CSYj0D8x.cjs} +12 -12
  27. package/dist/{faceFns-BeSpw0Dz.cjs → faceFns-C_iC_WkC.cjs} +2 -2
  28. package/dist/{faceFns-BzHfvPea.js → faceFns-f8AWRrzK.js} +2 -2
  29. package/dist/{healingFns-DtefNa-x.js → healingFns-BRXArH8z.js} +6 -6
  30. package/dist/{healingFns-BtZg6i3J.cjs → healingFns-W4_K9hXo.cjs} +6 -6
  31. package/dist/{helpers-CHUowMmV.js → helpers-COdYBjWD.js} +6 -6
  32. package/dist/{helpers-CFEuQ0ok.cjs → helpers-m-lbbfaz.cjs} +6 -6
  33. package/dist/{importFns-BLaneR8r.js → importFns-D8U3wLhV.js} +5 -5
  34. package/dist/{importFns-BX0866c6.cjs → importFns-Kr02P3cy.cjs} +5 -5
  35. package/dist/io.cjs +2 -2
  36. package/dist/io.js +2 -2
  37. package/dist/{loftFns-Byjbneme.cjs → loftFns-CVk6mzZj.cjs} +1 -1
  38. package/dist/{loftFns-Cth8Le9X.js → loftFns-MN9TgyG4.js} +1 -1
  39. package/dist/{measureFns-CLsSuByu.js → measureFns-9GzKgCdl.js} +3 -3
  40. package/dist/{measureFns-BlS2xJcn.cjs → measureFns-9aeYKFiR.cjs} +3 -3
  41. package/dist/measurement.cjs +2 -2
  42. package/dist/measurement.js +2 -2
  43. package/dist/{meshFns-ECQqx-8Q.cjs → meshFns-BwsjspzI.cjs} +3 -3
  44. package/dist/{meshFns-CzpP9SBf.js → meshFns-un9EDg7X.js} +3 -3
  45. package/dist/operations.cjs +2 -2
  46. package/dist/operations.js +2 -2
  47. package/dist/{primitiveFns-Kph3YP3A.js → primitiveFns-BICas2bb.js} +5 -5
  48. package/dist/{primitiveFns-CzhQz02F.cjs → primitiveFns-CIPm9vsq.cjs} +5 -5
  49. package/dist/{principalBoxFns-Ck9rR3Op.cjs → principalBoxFns-CQZRNYI3.cjs} +3 -3
  50. package/dist/{principalBoxFns-C8ZmZNxJ.js → principalBoxFns-DQytdykp.js} +3 -3
  51. package/dist/projection.cjs +1 -1
  52. package/dist/projection.js +1 -1
  53. package/dist/query.cjs +2 -2
  54. package/dist/query.js +2 -2
  55. package/dist/{refResolveFns-Cf16q6AH.js → refResolveFns-CpPBZkjT.js} +6 -6
  56. package/dist/{refResolveFns-CVUSuVee.cjs → refResolveFns-DNnNqpyn.cjs} +6 -6
  57. package/dist/{shapeFns-Bepwarf3.js → shapeFns-D6-l0Nwn.js} +2 -2
  58. package/dist/{shapeFns-BEwoFgq2.cjs → shapeFns-Dr_0yhYg.cjs} +2 -2
  59. package/dist/shapeRef.cjs +1 -1
  60. package/dist/shapeRef.js +1 -1
  61. package/dist/{shapeTypes-CIw6-GFy.cjs → shapeTypes-B23U9msC.cjs} +136 -7
  62. package/dist/{shapeTypes-hLHmANUz.js → shapeTypes-CSWkqhe9.js} +136 -7
  63. package/dist/sketching.cjs +3 -3
  64. package/dist/sketching.js +3 -3
  65. package/dist/{solidBuilders-IA8xNuxJ.js → solidBuilders-CQ1oQdBY.js} +3 -3
  66. package/dist/{solidBuilders-BVHK-era.cjs → solidBuilders-DIlNbnwK.cjs} +3 -3
  67. package/dist/{surfaceBuilders-DIM5GSAT.cjs → surfaceBuilders-BV-QYvCL.cjs} +3 -3
  68. package/dist/{surfaceBuilders-BYwkPzfM.js → surfaceBuilders-ZW6W8S1a.js} +3 -3
  69. package/dist/text.cjs +2 -2
  70. package/dist/text.js +2 -2
  71. package/dist/{textBlueprints-B4w-_4_D.js → textBlueprints-CwsfEEBS.js} +8 -8
  72. package/dist/{textBlueprints-CPJ6sBZZ.cjs → textBlueprints-DYrv0GjE.cjs} +8 -8
  73. package/dist/{textMetrics-na1BYw65.js → textMetrics-B_WRck8_.js} +1 -1
  74. package/dist/{textMetrics-Dfr_9G6g.cjs → textMetrics-gC0qYCN1.cjs} +1 -1
  75. package/dist/{threadFns-BEO0-PP6.js → threadFns-D9m_ywSR.js} +7 -7
  76. package/dist/{threadFns-CAsRIX6c.cjs → threadFns-srKixiXB.cjs} +7 -7
  77. package/dist/topology.cjs +9 -9
  78. package/dist/topology.js +9 -9
  79. package/dist/{topologyQueryFns-BYqsNs6q.js → topologyQueryFns-D8Du44mm.js} +1 -1
  80. package/dist/{topologyQueryFns-BNDmjz7x.cjs → topologyQueryFns-DJJoFJPW.cjs} +1 -1
  81. package/dist/{validityTypes-Gd5B_HcL.cjs → validityTypes-BkX2hYwP.cjs} +1 -1
  82. package/dist/{validityTypes-BYhzdgTM.js → validityTypes-DSzSU07u.js} +1 -1
  83. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-hLHmANUz.js";
1
+ import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
3
- import { a as getCachedSurfaceType } from "./topologyQueryFns-BYqsNs6q.js";
3
+ import { a as getCachedSurfaceType } from "./topologyQueryFns-D8Du44mm.js";
4
4
  import { r as toVec3 } from "./types-CKXsIm9-.js";
5
5
  // src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,13 +1,13 @@
1
- import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-hLHmANUz.js";
1
+ import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-CGsnjMOe.js";
3
3
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, u as unsupportedError, x as isOk } from "./errors-BTccWbtE.js";
4
- import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-BYqsNs6q.js";
4
+ import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-D8Du44mm.js";
5
5
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
6
- import { y as downcast } from "./faceFns-BzHfvPea.js";
7
- import { a as fuse, f as collectInputFaceHashes, h as propagateMetadataByHash, i as cutAll, m as propagateAllMetadata, n as copyAsBooleanResult, o as fuseAll, r as cut } from "./booleanFns-CopMFBLS.js";
8
- import { a as isSameShape } from "./shapeFns-Bepwarf3.js";
6
+ import { y as downcast } from "./faceFns-f8AWRrzK.js";
7
+ import { a as fuse, f as collectInputFaceHashes, h as propagateMetadataByHash, i as cutAll, m as propagateAllMetadata, n as copyAsBooleanResult, o as fuseAll, r as cut } from "./booleanFns-BuxgJmu2.js";
8
+ import { a as isSameShape } from "./shapeFns-D6-l0Nwn.js";
9
9
  import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
10
- import { i as facesOfEdge } from "./adjacencyFns-V29Gvfs9.js";
10
+ import { i as facesOfEdge } from "./adjacencyFns-Ce4lxSWp.js";
11
11
  // src/topology/threeHelpers.ts
12
12
  /**
13
13
  * Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
@@ -1,13 +1,13 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_occtWasmAdapter = require("./occtWasmAdapter-4YnvqZOW.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
7
- const require_booleanFns = require("./booleanFns-CA9tvtqr.cjs");
8
- const require_shapeFns = require("./shapeFns-BEwoFgq2.cjs");
6
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
7
+ const require_booleanFns = require("./booleanFns-CQIepT9X.cjs");
8
+ const require_shapeFns = require("./shapeFns-Dr_0yhYg.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
10
- const require_adjacencyFns = require("./adjacencyFns-BBugwmvl.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-DjblerpV.cjs");
11
11
  // src/topology/threeHelpers.ts
12
12
  /**
13
13
  * Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
@@ -1,12 +1,12 @@
1
- import { q as getKernel, y as isFace } from "./shapeTypes-hLHmANUz.js";
1
+ import { q as getKernel, y as isFace } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { E as ok, g as err, o as queryError, x as isOk } from "./errors-BTccWbtE.js";
3
- import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BYqsNs6q.js";
3
+ import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-D8Du44mm.js";
4
4
  import { t as DEG2RAD } from "./constants-iraOnb2p.js";
5
5
  import { a as vecDot, d as vecNormalize } from "./vecOps-S-m9H_fe.js";
6
- import { l as normalAt, s as getSurfaceType } from "./faceFns-BzHfvPea.js";
7
- import { a as isSameShape, n as getHashCode } from "./shapeFns-Bepwarf3.js";
8
- import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns--TqXOi8f.js";
9
- import { r as measureArea } from "./measureFns-CLsSuByu.js";
6
+ import { l as normalAt, s as getSurfaceType } from "./faceFns-f8AWRrzK.js";
7
+ import { a as isSameShape, n as getHashCode } from "./shapeFns-D6-l0Nwn.js";
8
+ import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-CQtl1RzI.js";
9
+ import { r as measureArea } from "./measureFns-9GzKgCdl.js";
10
10
  // 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
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
7
- const require_shapeFns = require("./shapeFns-BEwoFgq2.cjs");
8
- const require_curveFns = require("./curveFns-B29Eot3K.cjs");
9
- const require_measureFns = require("./measureFns-BlS2xJcn.cjs");
6
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
7
+ const require_shapeFns = require("./shapeFns-Dr_0yhYg.cjs");
8
+ const require_curveFns = require("./curveFns-DkG5mlUj.cjs");
9
+ const require_measureFns = require("./measureFns-9aeYKFiR.cjs");
10
10
  // 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 { C as isSolid, G as _usingCtx, S as isShell, _ as isCompound, n as castResultShape, q as getKernel } from "./shapeTypes-hLHmANUz.js";
1
+ import { C as isSolid, G as _usingCtx, S as isShell, _ as isCompound, n as castResultShape, q as getKernel } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { i as wasmIndex, r as vec3At$1 } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
4
- import { S as subShapeCount, c as getFaces, u as getShells } from "./topologyQueryFns-BYqsNs6q.js";
4
+ import { S as subShapeCount, c as getFaces, u as getShells } from "./topologyQueryFns-D8Du44mm.js";
5
5
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
6
- import { t as makeCompound } from "./solidBuilders-IA8xNuxJ.js";
7
- import { u as igesUnsupportedError } from "./meshFns-CzpP9SBf.js";
6
+ import { t as makeCompound } from "./solidBuilders-CQ1oQdBY.js";
7
+ import { u as igesUnsupportedError } from "./meshFns-un9EDg7X.js";
8
8
  import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
9
- import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-CDmOJybf.js";
9
+ import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-CeIbNzdp.js";
10
10
  // src/io/objExportFns.ts
11
11
  /** Read a vec3 from a typed array at the given vertex index. */
12
12
  function vec3At(arr, i) {
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.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-BNDmjz7x.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
- const require_solidBuilders = require("./solidBuilders-BVHK-era.cjs");
7
- const require_meshFns = require("./meshFns-ECQqx-8Q.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-DIlNbnwK.cjs");
7
+ const require_meshFns = require("./meshFns-BwsjspzI.cjs");
8
8
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
9
- const require_blueprint = require("./blueprint-BO8zuqoy.cjs");
9
+ const require_blueprint = require("./blueprint-D4YxCDeX.cjs");
10
10
  // src/io/objExportFns.ts
11
11
  /** Read a vec3 from a typed array at the given vertex index. */
12
12
  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-ECQqx-8Q.cjs");
3
- const require_importFns = require("./importFns-BX0866c6.cjs");
2
+ const require_meshFns = require("./meshFns-BwsjspzI.cjs");
3
+ const require_importFns = require("./importFns-Kr02P3cy.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-CzpP9SBf.js";
2
- import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-BLaneR8r.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-un9EDg7X.js";
2
+ import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-D8U3wLhV.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_occtWasmAdapter = require("./occtWasmAdapter-4YnvqZOW.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
4
  const require_types = require("./types-CjF9Rofr.cjs");
@@ -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-hLHmANUz.js";
1
+ import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-CGsnjMOe.js";
3
3
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
4
4
  import { r as toVec3 } from "./types-CKXsIm9-.js";
@@ -1,8 +1,8 @@
1
- import { q as getKernel } from "./shapeTypes-hLHmANUz.js";
1
+ import { q as getKernel } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-CGsnjMOe.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 } from "./topologyQueryFns-BYqsNs6q.js";
5
- import { m as uvBounds } from "./faceFns-BzHfvPea.js";
4
+ import { E as kernelCallRaw } from "./topologyQueryFns-D8Du44mm.js";
5
+ import { m as uvBounds } from "./faceFns-f8AWRrzK.js";
6
6
  // src/measurement/measureCache.ts
7
7
  var cache = /* @__PURE__ */ new WeakMap();
8
8
  function getCachedMeasurement(shape, key) {
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_occtWasmAdapter = require("./occtWasmAdapter-4YnvqZOW.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
5
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
5
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
6
6
  // src/measurement/measureCache.ts
7
7
  var cache = /* @__PURE__ */ new WeakMap();
8
8
  function getCachedMeasurement(shape, key) {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_measureFns = require("./measureFns-BlS2xJcn.cjs");
3
- const require_principalBoxFns = require("./principalBoxFns-Ck9rR3Op.cjs");
2
+ const require_measureFns = require("./measureFns-9aeYKFiR.cjs");
3
+ const require_principalBoxFns = require("./principalBoxFns-CQZRNYI3.cjs");
4
4
  exports.createDistanceQuery = require_measureFns.createDistanceQuery;
5
5
  exports.measureArea = require_measureFns.measureArea;
6
6
  exports.measureDistance = require_measureFns.measureDistance;
@@ -1,3 +1,3 @@
1
- import { c as measureLength, d as measureVolume, f as measureVolumeProps, l as measureLinearProps, o as measureDistance, r as measureArea, s as measureDistanceProps, t as createDistanceQuery, u as measureSurfaceProps } from "./measureFns-CLsSuByu.js";
2
- import { t as principalBoundingBox } from "./principalBoxFns-C8ZmZNxJ.js";
1
+ import { c as measureLength, d as measureVolume, f as measureVolumeProps, l as measureLinearProps, o as measureDistance, r as measureArea, s as measureDistanceProps, t as createDistanceQuery, u as measureSurfaceProps } from "./measureFns-9GzKgCdl.js";
2
+ import { t as principalBoundingBox } from "./principalBoxFns-DQytdykp.js";
3
3
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_occtWasmAdapter = require("./occtWasmAdapter-4YnvqZOW.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
5
- const require_solidBuilders = require("./solidBuilders-BVHK-era.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
5
+ const require_solidBuilders = require("./solidBuilders-DIlNbnwK.cjs");
6
6
  // src/topology/meshCache.ts
7
7
  /**
8
8
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,8 +1,8 @@
1
- import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-hLHmANUz.js";
1
+ import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { j as isUnsupportedKernelOperationError } from "./occtWasmAdapter-CGsnjMOe.js";
3
3
  import { E as ok, g as err, r as ioError, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
4
- import { d as getSolids, n as getBounds } from "./topologyQueryFns-BYqsNs6q.js";
5
- import { d as getFaceOrigins } from "./solidBuilders-IA8xNuxJ.js";
4
+ import { d as getSolids, n as getBounds } from "./topologyQueryFns-D8Du44mm.js";
5
+ import { d as getFaceOrigins } from "./solidBuilders-CQ1oQdBY.js";
6
6
  // src/topology/meshCache.ts
7
7
  /**
8
8
  * 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-CAsRIX6c.cjs");
3
- const require_loftFns = require("./loftFns-Byjbneme.cjs");
2
+ const require_threadFns = require("./threadFns-srKixiXB.cjs");
3
+ const require_loftFns = require("./loftFns-CVk6mzZj.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-BEO0-PP6.js";
2
- import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-Cth8Le9X.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-D9m_ywSR.js";
2
+ import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-MN9TgyG4.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
- import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-hLHmANUz.js";
1
+ import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-CSWkqhe9.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-BYhzdgTM.js";
3
+ import { n as isClosedWire } from "./validityTypes-DSzSU07u.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-IA8xNuxJ.js";
7
- import { f as collectInputFaceHashes, g as propagateMetadataThroughRelocation, h as propagateMetadataByHash, m as propagateAllMetadata, p as hasAnyMetadata } from "./booleanFns-CopMFBLS.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-BYwkPzfM.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-CQ1oQdBY.js";
7
+ import { f as collectInputFaceHashes, g as propagateMetadataThroughRelocation, h as propagateMetadataByHash, m as propagateAllMetadata, p as hasAnyMetadata } from "./booleanFns-BuxgJmu2.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-ZW6W8S1a.js";
9
9
  // src/topology/transformFns.ts
10
10
  /**
11
11
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,11 +1,11 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-Gd5B_HcL.cjs");
3
+ const require_validityTypes = require("./validityTypes-BkX2hYwP.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-BVHK-era.cjs");
7
- const require_booleanFns = require("./booleanFns-CA9tvtqr.cjs");
8
- const require_surfaceBuilders = require("./surfaceBuilders-DIM5GSAT.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-DIlNbnwK.cjs");
7
+ const require_booleanFns = require("./booleanFns-CQIepT9X.cjs");
8
+ const require_surfaceBuilders = require("./surfaceBuilders-BV-QYvCL.cjs");
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-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.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-BNDmjz7x.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
- const require_measureFns = require("./measureFns-BlS2xJcn.cjs");
6
+ const require_measureFns = require("./measureFns-9aeYKFiR.cjs");
7
7
  // src/measurement/principalBoxFns.ts
8
8
  /**
9
9
  * Principal-axes bounding box: a solid's extent measured in the frame of its
@@ -1,9 +1,9 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-hLHmANUz.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-CSWkqhe9.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 } from "./topologyQueryFns-BYqsNs6q.js";
4
+ import { E as kernelCallRaw } from "./topologyQueryFns-D8Du44mm.js";
5
5
  import { r as vecCross } from "./vecOps-S-m9H_fe.js";
6
- import { g as setCachedMeasurement, h as getCachedMeasurement, m as withSubShapes, p as withCompoundOf } from "./measureFns-CLsSuByu.js";
6
+ import { g as setCachedMeasurement, h as getCachedMeasurement, m as withSubShapes, p as withCompoundOf } from "./measureFns-9GzKgCdl.js";
7
7
  // src/measurement/principalBoxFns.ts
8
8
  /**
9
9
  * Principal-axes bounding box: a solid's extent measured in the frame of its
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-BJ35ht2H.cjs");
2
+ const require_cameraFns = require("./cameraFns-DL3zo3ol.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-BIIpsfds.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-s8km1l0J.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-CFEuQ0ok.cjs");
3
- const require_cornerFinder = require("./cornerFinder-D83OLL_I.cjs");
2
+ const require_helpers = require("./helpers-m-lbbfaz.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-uPZDWiyt.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-CHUowMmV.js";
2
- import { t as cornerFinder } from "./cornerFinder-C8VCstc3.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-COdYBjWD.js";
2
+ import { t as cornerFinder } from "./cornerFinder-D7P4vdaD.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,10 +1,10 @@
1
- import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-hLHmANUz.js";
2
- import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-BYqsNs6q.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-BzHfvPea.js";
1
+ import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-CSWkqhe9.js";
2
+ import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-D8Du44mm.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-f8AWRrzK.js";
4
4
  import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
5
- import { n as getHashCode } from "./shapeFns-Bepwarf3.js";
6
- import { c as measureLength, r as measureArea } from "./measureFns-CLsSuByu.js";
7
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-V29Gvfs9.js";
5
+ import { n as getHashCode } from "./shapeFns-D6-l0Nwn.js";
6
+ import { c as measureLength, r as measureArea } from "./measureFns-9GzKgCdl.js";
7
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-Ce4lxSWp.js";
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
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
3
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
3
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
4
4
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
5
- const require_shapeFns = require("./shapeFns-BEwoFgq2.cjs");
6
- const require_measureFns = require("./measureFns-BlS2xJcn.cjs");
7
- const require_adjacencyFns = require("./adjacencyFns-BBugwmvl.cjs");
5
+ const require_shapeFns = require("./shapeFns-Dr_0yhYg.cjs");
6
+ const require_measureFns = require("./measureFns-9aeYKFiR.cjs");
7
+ const require_adjacencyFns = require("./adjacencyFns-DjblerpV.cjs");
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-hLHmANUz.js";
1
+ import { q as getKernel } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-BYqsNs6q.js";
3
+ import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-D8Du44mm.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-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.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-CVUSuVee.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-DNnNqpyn.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-Cf16q6AH.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-CpPBZkjT.js";
@@ -10275,9 +10275,10 @@ function boundingBox$1(bk, shape) {
10275
10275
  };
10276
10276
  }
10277
10277
  /**
10278
- * Points whose bounding box is the shape's: a solid's own box corners, and for
10279
- * anything else the box points of its edges (see `edgeBoxPoints`), so an arc's
10280
- * bulge counts and not just its end vertices.
10278
+ * Points whose bounding box is the shape's: a solid's own box corners, a
10279
+ * face's or shell's face box points (see `faceBoxPoints`), and for anything
10280
+ * else the box points of its edges (see `edgeBoxPoints`), so an arc's bulge
10281
+ * counts and not just its end vertices.
10281
10282
  */
10282
10283
  function boxPoints(bk, h) {
10283
10284
  switch (h.type) {
@@ -10287,13 +10288,141 @@ function boxPoints(bk, h) {
10287
10288
  }
10288
10289
  case "vertex": return [require_bug.vec3At(bk.getVertexPosition(h.id))];
10289
10290
  case "edge": return edgeBoxPoints(bk, h.id);
10291
+ case "face": return faceBoxPoints(bk, h);
10292
+ case "shell": return iterShapes$1(bk, h, "face").flatMap((f) => faceBoxPoints(bk, f));
10290
10293
  case "compound": return (syntheticCompounds.get(h.id) ?? compoundSolidIds(bk, h.id).map(solidHandle)).flatMap((child) => boxPoints(bk, child));
10291
- default: {
10292
- const edges = iterShapes$1(bk, h, "edge");
10293
- if (edges.length > 0) return edges.flatMap((e) => edgeBoxPoints(bk, unwrap$1(e)));
10294
- return iterShapes$1(bk, h, "vertex").map((v) => vertexPosition(bk, v));
10294
+ default: return boundaryBoxPoints(bk, h);
10295
+ }
10296
+ }
10297
+ function boundaryBoxPoints(bk, h) {
10298
+ const edges = iterShapes$1(bk, h, "edge");
10299
+ if (edges.length > 0) return edges.flatMap((e) => edgeBoxPoints(bk, unwrap$1(e)));
10300
+ return iterShapes$1(bk, h, "vertex").map((v) => vertexPosition(bk, v));
10301
+ }
10302
+ /**
10303
+ * A face's extreme along an axis lies on its boundary or at a point inside it
10304
+ * where that coordinate peaks on the surface. Planes, cylinders, and cones have
10305
+ * no such interior peak (a straight line through any inner point runs to the
10306
+ * boundary), so their edges bound them. A sphere or torus adds the surface's
10307
+ * peak points that lie on the face, which bounds it exactly; any other surface
10308
+ * adds the vertices of its tessellation, which bound it to within the
10309
+ * deflection.
10310
+ */
10311
+ function faceBoxPoints(bk, face) {
10312
+ const points = boundaryBoxPoints(bk, face);
10313
+ const surfaceType = bk.getSurfaceType(face.id);
10314
+ if (surfaceType === "plane" || surfaceType === "cylinder" || surfaceType === "cone") return points;
10315
+ const peaks = surfacePeaks(bk, face.id);
10316
+ if (peaks) {
10317
+ const tolerance = ON_FACE_TOLERANCE * Math.max(1, peaks.size);
10318
+ const onFace = (p) => require_bug.wasmIndex(bk.pointToFaceDistance(p[0], p[1], p[2], face.id), 0) <= tolerance;
10319
+ return [...points, ...peaks.points.filter(onFace)];
10320
+ }
10321
+ const { positions } = bk.tessellateFace(face.id, MESH_BOX_DEFLECTION * (diagonal(points) || 1));
10322
+ const vertices = [];
10323
+ for (let i = 0; i + 2 < positions.length; i += 3) vertices.push(require_bug.vec3At(positions, i));
10324
+ return [...points, ...vertices];
10325
+ }
10326
+ var ON_FACE_TOLERANCE = 1e-7;
10327
+ var MESH_BOX_DEFLECTION = .001;
10328
+ var TORUS_CIRCLE_SAMPLES = 64;
10329
+ var AXES = [
10330
+ [
10331
+ 1,
10332
+ 0,
10333
+ 0
10334
+ ],
10335
+ [
10336
+ 0,
10337
+ 1,
10338
+ 0
10339
+ ],
10340
+ [
10341
+ 0,
10342
+ 0,
10343
+ 1
10344
+ ]
10345
+ ];
10346
+ function diagonal(points) {
10347
+ if (points.length === 0) return 0;
10348
+ const span = [
10349
+ 0,
10350
+ 1,
10351
+ 2
10352
+ ].map((k) => {
10353
+ const values = points.map((p) => require_bug.wasmIndex(p, k));
10354
+ return Math.max(...values) - Math.min(...values);
10355
+ });
10356
+ return Math.hypot(...span);
10357
+ }
10358
+ var add$1 = (a, b, s = 1) => [
10359
+ a[0] + s * b[0],
10360
+ a[1] + s * b[1],
10361
+ a[2] + s * b[2]
10362
+ ];
10363
+ var dot$1 = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
10364
+ /**
10365
+ * The points where a coordinate peaks on a sphere or torus surface, with the
10366
+ * surface's size for the on-face tolerance; undefined for any other surface or
10367
+ * a torus whose frame does not read back as orthonormal.
10368
+ */
10369
+ function surfacePeaks(bk, faceId) {
10370
+ let params;
10371
+ try {
10372
+ params = JSON.parse(bk.getAnalyticSurfaceParams(faceId));
10373
+ } catch {
10374
+ return;
10375
+ }
10376
+ const c = params.center;
10377
+ if (c?.length !== 3) return void 0;
10378
+ if (params.type === "sphere" && typeof params.radius === "number") {
10379
+ const r = params.radius;
10380
+ return {
10381
+ points: AXES.flatMap((e) => [add$1(c, e, r), add$1(c, e, -r)]),
10382
+ size: r
10383
+ };
10384
+ }
10385
+ if (params.type === "torus" && typeof params.majorRadius === "number" && typeof params.minorRadius === "number") return torusPeaks(bk, faceId, c, params.majorRadius, params.minorRadius);
10386
+ }
10387
+ /**
10388
+ * brepkit's torus params carry no axis, so the frame is read off the surface,
10389
+ * which brepkit parametrizes as c + (R + r cos v)(cos u X + sin u Y) + r sin v Z.
10390
+ * Along a direction d with a component w across the axis, the coordinate peaks
10391
+ * at c ± (R w/|w| + r d). Along the axis it peaks on the whole circle at c ± r Z,
10392
+ * which is sampled.
10393
+ */
10394
+ function torusPeaks(bk, faceId, c, majorR, minorR) {
10395
+ const at = (u, v) => require_bug.vec3At(bk.evaluateSurface(faceId, u, v));
10396
+ const x = add$1(at(0, 0), c, -1).map((n) => n / (majorR + minorR));
10397
+ const z = add$1(add$1(at(0, Math.PI / 2), c, -1), x, -majorR).map((n) => n / minorR);
10398
+ const unit = (p) => Math.abs(Math.hypot(...p) - 1) < 1e-6;
10399
+ if (!unit(x) || !unit(z) || Math.abs(dot$1(x, z)) > 1e-6) return void 0;
10400
+ const y = [
10401
+ z[1] * x[2] - z[2] * x[1],
10402
+ z[2] * x[0] - z[0] * x[2],
10403
+ z[0] * x[1] - z[1] * x[0]
10404
+ ];
10405
+ const points = [];
10406
+ for (const d of AXES) {
10407
+ const across = add$1(d, z, -dot$1(d, z));
10408
+ const len = Math.hypot(...across);
10409
+ if (len > 1e-9) {
10410
+ const peak = add$1(across.map((n) => n * majorR / len), d, minorR);
10411
+ points.push(add$1(c, peak), add$1(c, peak, -1));
10412
+ continue;
10413
+ }
10414
+ for (const side of [1, -1]) {
10415
+ const rim = add$1(c, z, side * minorR);
10416
+ for (let i = 0; i < TORUS_CIRCLE_SAMPLES; i++) {
10417
+ const t = 2 * Math.PI * i / TORUS_CIRCLE_SAMPLES;
10418
+ points.push(add$1(add$1(rim, x, majorR * Math.cos(t)), y, majorR * Math.sin(t)));
10419
+ }
10295
10420
  }
10296
10421
  }
10422
+ return {
10423
+ points,
10424
+ size: majorR + minorR
10425
+ };
10297
10426
  }
10298
10427
  /**
10299
10428
  * Minimum distance between two shapes. brepkit-wasm measures from a point to a