brepjs 12.8.2 → 12.9.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 (225) hide show
  1. package/dist/2d/lib/svgPath.d.ts.map +1 -1
  2. package/dist/2d/lib/vectorOperations.d.ts +4 -1
  3. package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
  4. package/dist/2d.cjs +2 -2
  5. package/dist/2d.js +5 -5
  6. package/dist/{Blueprint-DbVaf6k7.js → Blueprint-1HGbugaC.js} +33 -63
  7. package/dist/{Blueprint-CQ28WJhz.cjs → Blueprint-CUyXM6CV.cjs} +15 -45
  8. package/dist/{boolean2D-0blbVtJ8.cjs → boolean2D-9OnbotKT.cjs} +9 -9
  9. package/dist/{boolean2D-y3E92F0u.js → boolean2D-CR4efa35.js} +11 -11
  10. package/dist/{booleanFns-gmsX3Cv2.cjs → booleanFns-BBd2oTvv.cjs} +43 -40
  11. package/dist/{booleanFns-BCTjYZAg.js → booleanFns-Br2KdGJq.js} +53 -50
  12. package/dist/brepjs.cjs +379 -284
  13. package/dist/brepjs.js +1437 -1341
  14. package/dist/core/definitionMaps.d.ts +2 -7
  15. package/dist/core/definitionMaps.d.ts.map +1 -1
  16. package/dist/core/dimensionTypes.d.ts +52 -0
  17. package/dist/core/dimensionTypes.d.ts.map +1 -0
  18. package/dist/core/disposal.d.ts +18 -0
  19. package/dist/core/disposal.d.ts.map +1 -1
  20. package/dist/core/errors.d.ts +1 -8
  21. package/dist/core/errors.d.ts.map +1 -1
  22. package/dist/core/kernelErrorTranslation.d.ts +15 -0
  23. package/dist/core/kernelErrorTranslation.d.ts.map +1 -0
  24. package/dist/core/planeOps.d.ts +14 -0
  25. package/dist/core/planeOps.d.ts.map +1 -1
  26. package/dist/core/result.d.ts +4 -0
  27. package/dist/core/result.d.ts.map +1 -1
  28. package/dist/core/shapeTypes.d.ts +14 -146
  29. package/dist/core/shapeTypes.d.ts.map +1 -1
  30. package/dist/core/typeDiscriminants.d.ts +14 -0
  31. package/dist/core/typeDiscriminants.d.ts.map +1 -0
  32. package/dist/core/validityTypes.d.ts +100 -0
  33. package/dist/core/validityTypes.d.ts.map +1 -0
  34. package/dist/core.cjs +52 -11
  35. package/dist/core.d.ts +1 -1
  36. package/dist/core.d.ts.map +1 -1
  37. package/dist/core.js +118 -75
  38. package/dist/{curveFns-mROFhiuG.js → curveFns-1u0oZ0u0.js} +14 -14
  39. package/dist/{curveFns-BZngcnQ1.cjs → curveFns-BwLvO_Ia.cjs} +2 -2
  40. package/dist/{drawFns-Bwakrq7w.js → drawFns-B0na6sbo.js} +16 -16
  41. package/dist/{drawFns-CjRc1NfQ.cjs → drawFns-CzlEePor.cjs} +18 -18
  42. package/dist/{faceFns-DB1Fc5gy.cjs → faceFns-BAKkZG6D.cjs} +2 -2
  43. package/dist/{faceFns-B8GnxjdY.js → faceFns-DGMp47Os.js} +3 -3
  44. package/dist/{helpers-C8NoT0Wu.cjs → helpers-DVdscQxW.cjs} +73 -8
  45. package/dist/{helpers-X0juxnwj.js → helpers-sJjnIXDA.js} +85 -20
  46. package/dist/index.d.ts +10 -11
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/io.cjs +4 -4
  49. package/dist/io.js +4 -4
  50. package/dist/kernel/brepkit/booleanOps.d.ts +23 -0
  51. package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -0
  52. package/dist/kernel/brepkit/constructionOps.d.ts +51 -0
  53. package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -0
  54. package/dist/kernel/brepkit/evolutionOps.d.ts +31 -0
  55. package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -0
  56. package/dist/kernel/brepkit/geometryOps.d.ts +56 -0
  57. package/dist/kernel/brepkit/geometryOps.d.ts.map +1 -0
  58. package/dist/kernel/brepkit/helpers.d.ts +84 -0
  59. package/dist/kernel/brepkit/helpers.d.ts.map +1 -0
  60. package/dist/kernel/brepkit/internalOps.d.ts +28 -0
  61. package/dist/kernel/brepkit/internalOps.d.ts.map +1 -0
  62. package/dist/kernel/brepkit/ioOps.d.ts +43 -0
  63. package/dist/kernel/brepkit/ioOps.d.ts.map +1 -0
  64. package/dist/kernel/brepkit/measureOps.d.ts +30 -0
  65. package/dist/kernel/brepkit/measureOps.d.ts.map +1 -0
  66. package/dist/kernel/brepkit/meshOps.d.ts +7 -0
  67. package/dist/kernel/brepkit/meshOps.d.ts.map +1 -0
  68. package/dist/kernel/brepkit/modifierOps.d.ts +15 -0
  69. package/dist/kernel/brepkit/modifierOps.d.ts.map +1 -0
  70. package/dist/kernel/brepkit/repairOps.d.ts +14 -0
  71. package/dist/kernel/brepkit/repairOps.d.ts.map +1 -0
  72. package/dist/kernel/brepkit/sweepOps.d.ts +27 -0
  73. package/dist/kernel/brepkit/sweepOps.d.ts.map +1 -0
  74. package/dist/kernel/brepkit/topologyOps.d.ts +16 -0
  75. package/dist/kernel/brepkit/topologyOps.d.ts.map +1 -0
  76. package/dist/kernel/brepkit/transformOps.d.ts +14 -0
  77. package/dist/kernel/brepkit/transformOps.d.ts.map +1 -0
  78. package/dist/kernel/brepkitAdapter.d.ts +1 -1
  79. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  80. package/dist/kernel/brepkitWasmTypes.d.ts +8 -0
  81. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  82. package/dist/kernel/defaultAdapter.d.ts.map +1 -1
  83. package/dist/kernel/extendedConstructorOps.d.ts +9 -1
  84. package/dist/kernel/extendedConstructorOps.d.ts.map +1 -1
  85. package/dist/kernel/index.d.ts +1 -0
  86. package/dist/kernel/index.d.ts.map +1 -1
  87. package/dist/kernel/interfaces/boolean-ops.d.ts +25 -0
  88. package/dist/kernel/interfaces/boolean-ops.d.ts.map +1 -0
  89. package/dist/kernel/interfaces/construction-ops.d.ts +76 -0
  90. package/dist/kernel/interfaces/construction-ops.d.ts.map +1 -0
  91. package/dist/kernel/interfaces/core.d.ts +45 -0
  92. package/dist/kernel/interfaces/core.d.ts.map +1 -0
  93. package/dist/kernel/interfaces/evolution-ops.d.ts +19 -0
  94. package/dist/kernel/interfaces/evolution-ops.d.ts.map +1 -0
  95. package/dist/kernel/interfaces/geometry-ops.d.ts +77 -0
  96. package/dist/kernel/interfaces/geometry-ops.d.ts.map +1 -0
  97. package/dist/kernel/interfaces/index.d.ts +29 -0
  98. package/dist/kernel/interfaces/index.d.ts.map +1 -0
  99. package/dist/kernel/interfaces/io-ops.d.ts +66 -0
  100. package/dist/kernel/interfaces/io-ops.d.ts.map +1 -0
  101. package/dist/kernel/interfaces/measure-ops.d.ts +35 -0
  102. package/dist/kernel/interfaces/measure-ops.d.ts.map +1 -0
  103. package/dist/kernel/interfaces/mesh-ops.d.ts +21 -0
  104. package/dist/kernel/interfaces/mesh-ops.d.ts.map +1 -0
  105. package/dist/kernel/interfaces/modifier-ops.d.ts +22 -0
  106. package/dist/kernel/interfaces/modifier-ops.d.ts.map +1 -0
  107. package/dist/kernel/interfaces/repair-ops.d.ts +36 -0
  108. package/dist/kernel/interfaces/repair-ops.d.ts.map +1 -0
  109. package/dist/kernel/interfaces/sweep-ops.d.ts +49 -0
  110. package/dist/kernel/interfaces/sweep-ops.d.ts.map +1 -0
  111. package/dist/kernel/interfaces/topology-ops.d.ts +30 -0
  112. package/dist/kernel/interfaces/topology-ops.d.ts.map +1 -0
  113. package/dist/kernel/interfaces/transform-ops.d.ts +20 -0
  114. package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -0
  115. package/dist/kernel/modifierOps.d.ts +2 -2
  116. package/dist/kernel/modifierOps.d.ts.map +1 -1
  117. package/dist/kernel/types.d.ts +2 -446
  118. package/dist/kernel/types.d.ts.map +1 -1
  119. package/dist/{loft-hp3pc1M7.cjs → loft-BNvBZzqe.cjs} +5 -5
  120. package/dist/{loft-Bhw-FMoL.js → loft-D0aCZRaB.js} +7 -7
  121. package/dist/measurement/measureFns.d.ts +2 -2
  122. package/dist/measurement/measureFns.d.ts.map +1 -1
  123. package/dist/{measurement-D8EJ694A.js → measurement-C7o5jE6G.js} +2 -2
  124. package/dist/{measurement-BoNTUBAp.cjs → measurement-DZcaxo1A.cjs} +2 -2
  125. package/dist/measurement.cjs +1 -1
  126. package/dist/measurement.js +1 -1
  127. package/dist/{meshFns-BnV0ZR8w.cjs → meshFns-7dgZgNYK.cjs} +4 -4
  128. package/dist/{meshFns-nQjK38EC.js → meshFns-CtUl9fGY.js} +3 -3
  129. package/dist/operations/compoundOpsFns.d.ts +38 -0
  130. package/dist/operations/compoundOpsFns.d.ts.map +1 -0
  131. package/dist/operations/extrude.d.ts +2 -12
  132. package/dist/operations/extrude.d.ts.map +1 -1
  133. package/dist/operations/extrudeFns.d.ts +2 -93
  134. package/dist/operations/extrudeFns.d.ts.map +1 -1
  135. package/dist/operations/guidedSweepFns.d.ts +3 -22
  136. package/dist/operations/guidedSweepFns.d.ts.map +1 -1
  137. package/dist/operations/loft.d.ts +2 -16
  138. package/dist/operations/loft.d.ts.map +1 -1
  139. package/dist/operations/multiSweepFns.d.ts +3 -29
  140. package/dist/operations/multiSweepFns.d.ts.map +1 -1
  141. package/dist/operations/roofFns.d.ts +2 -2
  142. package/dist/operations/roofFns.d.ts.map +1 -1
  143. package/dist/operations/sweepFns.d.ts +121 -0
  144. package/dist/operations/sweepFns.d.ts.map +1 -0
  145. package/dist/{operations-BfbkK6DU.js → operations-DisJ5F8s.js} +110 -57
  146. package/dist/{operations-CYpmLSC4.cjs → operations-DwZ-RBO1.cjs} +97 -44
  147. package/dist/operations.cjs +2 -2
  148. package/dist/operations.js +14 -14
  149. package/dist/originTrackingFns-NJ1dWoiF.js +137 -0
  150. package/dist/originTrackingFns-dhaCe8Yb.cjs +136 -0
  151. package/dist/query/edgeFinder.d.ts +4 -14
  152. package/dist/query/edgeFinder.d.ts.map +1 -1
  153. package/dist/query/faceFinder.d.ts +4 -14
  154. package/dist/query/faceFinder.d.ts.map +1 -1
  155. package/dist/query/finderCore.d.ts +6 -0
  156. package/dist/query/finderCore.d.ts.map +1 -1
  157. package/dist/query/shapeFinders.d.ts +32 -0
  158. package/dist/query/shapeFinders.d.ts.map +1 -0
  159. package/dist/query/wireFinder.d.ts +4 -9
  160. package/dist/query/wireFinder.d.ts.map +1 -1
  161. package/dist/query.cjs +54 -32
  162. package/dist/query.js +56 -34
  163. package/dist/{result-fAX0OZzI.cjs → result-DJAAj1yb.cjs} +8 -59
  164. package/dist/{result-BaSD1fqR.js → result-DtuwWSUD.js} +38 -89
  165. package/dist/result.cjs +1 -1
  166. package/dist/result.js +22 -22
  167. package/dist/shapeFns-BJbua5kT.js +34 -0
  168. package/dist/shapeFns-w9tWELHX.cjs +33 -0
  169. package/dist/{shapeTypes-CpSaBLDv.js → shapeTypes-CAEAyk8j.js} +233 -172
  170. package/dist/{shapeTypes-7xEam9Ri.cjs → shapeTypes-owrg2MNK.cjs} +421 -360
  171. package/dist/sketching/Sketcher.d.ts.map +1 -1
  172. package/dist/sketching.cjs +2 -2
  173. package/dist/sketching.js +2 -2
  174. package/dist/{solidBuilders-994_MQwB.cjs → solidBuilders-BLQ4I6Ig.cjs} +3 -3
  175. package/dist/{solidBuilders-DmwhTCCd.js → solidBuilders-BS-1220W.js} +3 -3
  176. package/dist/{surfaceBuilders-nQdJ56fe.js → surfaceBuilders-Dj6AjhOv.js} +7 -7
  177. package/dist/{surfaceBuilders-5VA34a3_.cjs → surfaceBuilders-KU_7OD2q.cjs} +3 -3
  178. package/dist/topology/booleanFns.d.ts.map +1 -1
  179. package/dist/topology/compoundOpsFns.d.ts +3 -35
  180. package/dist/topology/compoundOpsFns.d.ts.map +1 -1
  181. package/dist/topology/index.d.ts +0 -1
  182. package/dist/topology/index.d.ts.map +1 -1
  183. package/dist/topology/metadataPropagation.d.ts +30 -0
  184. package/dist/topology/metadataPropagation.d.ts.map +1 -0
  185. package/dist/topology/modifierFns.d.ts.map +1 -1
  186. package/dist/topology/originTrackingFns.d.ts +23 -0
  187. package/dist/topology/originTrackingFns.d.ts.map +1 -0
  188. package/dist/topology/shapeFns.d.ts +6 -120
  189. package/dist/topology/shapeFns.d.ts.map +1 -1
  190. package/dist/topology/topologyQueryFns.d.ts +67 -0
  191. package/dist/topology/topologyQueryFns.d.ts.map +1 -0
  192. package/dist/topology/transformFns.d.ts +49 -0
  193. package/dist/topology/transformFns.d.ts.map +1 -0
  194. package/dist/topology/wrapperFns.d.ts.map +1 -1
  195. package/dist/{topology-ANwCzGL8.cjs → topology-CyPHYYjV.cjs} +205 -20
  196. package/dist/{topology-C7x98OVn.js → topology-D6LeuhI_.js} +235 -50
  197. package/dist/topology.cjs +18 -17
  198. package/dist/topology.js +92 -91
  199. package/dist/topologyQueryFns-De439iBP.js +119 -0
  200. package/dist/topologyQueryFns-fz5kz5e1.cjs +118 -0
  201. package/dist/{types-CWDdqcrq.js → types-CcKqsmd0.js} +2 -2
  202. package/dist/utils/precisionRound.d.ts +4 -0
  203. package/dist/utils/precisionRound.d.ts.map +1 -1
  204. package/dist/utils/vec2d.d.ts +5 -0
  205. package/dist/utils/vec2d.d.ts.map +1 -1
  206. package/dist/{vecOps-ZDdZWbwT.js → vecOps-LTN--A58.js} +15 -15
  207. package/dist/{vectors-D_IiZx0q.cjs → vectors-C8N_QeEX.cjs} +9 -1
  208. package/dist/{vectors-Bx8wkNui.js → vectors-DTREgnVp.js} +15 -7
  209. package/dist/vectors.cjs +1 -1
  210. package/dist/vectors.js +23 -23
  211. package/package.json +3 -3
  212. package/dist/core/geometryHelpers.d.ts +0 -30
  213. package/dist/core/geometryHelpers.d.ts.map +0 -1
  214. package/dist/core/memory.d.ts +0 -6
  215. package/dist/core/memory.d.ts.map +0 -1
  216. package/dist/core/typeErrors.d.ts +0 -17
  217. package/dist/core/typeErrors.d.ts.map +0 -1
  218. package/dist/cornerFinder-Ckz-mPHE.js +0 -59
  219. package/dist/cornerFinder-ZmOyOOsh.cjs +0 -58
  220. package/dist/shapeFns-C2SnNvdH.cjs +0 -468
  221. package/dist/shapeFns-FDuKkrDR.js +0 -469
  222. package/dist/utils/round2.d.ts +0 -3
  223. package/dist/utils/round2.d.ts.map +0 -1
  224. package/dist/utils/round5.d.ts +0 -3
  225. package/dist/utils/round5.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"svgPath.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/svgPath.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,EAAE,WAAW,OAAO,KAAG,MAiE3E,CAAC"}
1
+ {"version":3,"file":"svgPath.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/svgPath.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,EAAE,WAAW,OAAO,KAAG,MAiE3E,CAAC"}
@@ -3,7 +3,10 @@ export { samePoint, add2d, subtract2d, scalarMultiply2d, distance2d, squareDista
3
3
  /**
4
4
  * Normalize a 2D vector to unit length.
5
5
  *
6
+ * Unlike the Layer 0 version (which returns [0,0] for zero-length vectors),
7
+ * this throws a BrepBugError — Layer 2 code should never pass zero-length vectors.
8
+ *
6
9
  * @throws When the vector has near-zero length.
7
10
  */
8
- export declare const normalize2d: ([x0, y0]: Point2D) => Point2D;
11
+ export declare const normalize2d: ([x, y]: Point2D) => Point2D;
9
12
  //# sourceMappingURL=vectorOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vectorOperations.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/vectorOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,OAAO,EACL,SAAS,EACT,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,OAAO,KAAG,OAM/C,CAAC"}
1
+ {"version":3,"file":"vectorOperations.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/vectorOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,OAAO,EACL,SAAS,EACT,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,OAAO,KAAG,OAM7C,CAAC"}
package/dist/2d.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Blueprint = require("./Blueprint-CQ28WJhz.cjs");
4
- const boolean2D = require("./boolean2D-0blbVtJ8.cjs");
3
+ const Blueprint = require("./Blueprint-CUyXM6CV.cjs");
4
+ const boolean2D = require("./boolean2D-9OnbotKT.cjs");
5
5
  function reverseCurve(curve) {
6
6
  const cloned = curve.clone();
7
7
  cloned.reverse();
package/dist/2d.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as Blueprint } from "./Blueprint-DbVaf6k7.js";
2
- import { e, C } from "./Blueprint-DbVaf6k7.js";
3
- import { c, C as C2, d, j, f, k, h, l, o, p, r } from "./boolean2D-y3E92F0u.js";
1
+ import { B as Blueprint } from "./Blueprint-1HGbugaC.js";
2
+ import { d, C } from "./Blueprint-1HGbugaC.js";
3
+ import { c, C as C2, d as d2, j, f, k, h, l, o, p, r } from "./boolean2D-CR4efa35.js";
4
4
  function reverseCurve(curve) {
5
5
  const cloned = curve.clone();
6
6
  cloned.reverse();
@@ -69,7 +69,7 @@ function sketch2DOnFace(bp, face, scaleMode) {
69
69
  export {
70
70
  Blueprint,
71
71
  c as Blueprints,
72
- e as BoundingBox2d,
72
+ d as BoundingBox2d,
73
73
  C2 as CompoundBlueprint,
74
74
  C as Curve2D,
75
75
  createBlueprint,
@@ -81,7 +81,7 @@ export {
81
81
  curve2dParameter,
82
82
  curve2dSplitAt,
83
83
  curve2dTangentAt,
84
- d as cut2D,
84
+ d2 as cut2D,
85
85
  j as cutBlueprints,
86
86
  f as fuse2D,
87
87
  k as fuseBlueprints,
@@ -1,40 +1,12 @@
1
- import { r as resolvePlane } from "./vectors-Bx8wkNui.js";
2
- import { a as toVec3 } from "./types-CWDdqcrq.js";
3
- import { B as getKernel, J as getKernel2D, K as registerForCleanup, L as unregisterFromCleanup, H as createEdge, G as createWire } from "./shapeTypes-CpSaBLDv.js";
4
- import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-B8GnxjdY.js";
5
- import { g as getOrientation } from "./curveFns-mROFhiuG.js";
6
- import { b as bug, o as ok, e as err, d as computationError, v as unwrap, z as validationError } from "./result-BaSD1fqR.js";
7
- import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, e as subtract2d, g as getSingleFace } from "./helpers-X0juxnwj.js";
8
- import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
9
- import { m as makeFace } from "./surfaceBuilders-nQdJ56fe.js";
10
- function makePlane(plane, origin) {
11
- if (plane && typeof plane !== "string") {
12
- return { ...plane };
13
- } else {
14
- return resolvePlane(plane ?? "XY", origin);
15
- }
16
- }
17
- function mirror(shape, inputPlane, origin) {
18
- let originVec;
19
- let directionVec;
20
- if (typeof inputPlane === "string") {
21
- const plane = resolvePlane(inputPlane, origin);
22
- originVec = plane.origin;
23
- directionVec = plane.zDir;
24
- } else if (inputPlane && typeof inputPlane === "object" && "origin" in inputPlane && "zDir" in inputPlane) {
25
- originVec = origin ? toVec3(origin) : inputPlane.origin;
26
- directionVec = inputPlane.zDir;
27
- } else if (inputPlane) {
28
- originVec = origin ? toVec3(origin) : [0, 0, 0];
29
- directionVec = toVec3(inputPlane);
30
- } else {
31
- const plane = resolvePlane("YZ", origin);
32
- originVec = plane.origin;
33
- directionVec = plane.zDir;
34
- }
35
- const newShape = getKernel().mirror(shape, originVec, directionVec);
36
- return newShape;
37
- }
1
+ import { m as makePlane } from "./vectors-DTREgnVp.js";
2
+ import { p as getKernel2D, r as registerForCleanup, u as unregisterFromCleanup, g as getKernel, m as createEdge, l as createWire } from "./shapeTypes-CAEAyk8j.js";
3
+ import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-DGMp47Os.js";
4
+ import { b as getOrientation } from "./curveFns-1u0oZ0u0.js";
5
+ import { c as bug, o as ok, e as err, d as computationError, u as unwrap, v as validationError } from "./result-DtuwWSUD.js";
6
+ import { n as normalize2d$1, d as distance2d, s as samePoint, a as scalarMultiply2d, b as add2d, c as subtract2d, g as getSingleFace } from "./helpers-sJjnIXDA.js";
7
+ import { t as toVec3 } from "./types-CcKqsmd0.js";
8
+ import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-LTN--A58.js";
9
+ import { c as makeFace } from "./surfaceBuilders-Dj6AjhOv.js";
38
10
  function isPoint2D(point) {
39
11
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
40
12
  }
@@ -46,6 +18,9 @@ function precisionRound(number, precision) {
46
18
  function round2(v) {
47
19
  return Math.round(v * 100) / 100;
48
20
  }
21
+ function round5(v) {
22
+ return Math.round(v * 1e5) / 1e5;
23
+ }
49
24
  const reprPnt = ([x, y]) => {
50
25
  return `(${round2(x)},${round2(y)})`;
51
26
  };
@@ -137,12 +112,12 @@ class BoundingBox2d {
137
112
  return !getKernel2D().isBBox2dOutPoint(this.wrapped, other[0], other[1]);
138
113
  }
139
114
  }
140
- const normalize2d = ([x0, y0]) => {
141
- const l = distance2d([x0, y0]);
142
- if (l < 1e-12) {
115
+ const normalize2d = ([x, y]) => {
116
+ const result = normalize2d$1([x, y]);
117
+ if (result[0] === 0 && result[1] === 0) {
143
118
  bug("normalize2d", "Cannot normalize zero-length vector");
144
119
  }
145
- return [x0 / l, y0 / l];
120
+ return result;
146
121
  };
147
122
  function deserializeCurve2D(data) {
148
123
  return new Curve2D(getKernel().deserializeCurve2d(data));
@@ -516,9 +491,6 @@ const make2dArcFromCenter = (startPoint, endPoint, center, longArc = false) => {
516
491
  endPoint
517
492
  );
518
493
  };
519
- function round5(v) {
520
- return Math.round(v * 1e5) / 1e5;
521
- }
522
494
  const adaptedCurveToPathElem = (curve, lastPoint) => {
523
495
  const k2d = getKernel2D();
524
496
  const curveType = curve.geomType;
@@ -979,26 +951,24 @@ class Blueprint {
979
951
  export {
980
952
  Blueprint as B,
981
953
  Curve2D as C,
982
- make2dSegmentCurve as a,
983
- make2dArcFromCenter as b,
954
+ make2dArcFromCenter as a,
955
+ approximateAsSvgCompatibleCurve as b,
984
956
  curvesAsEdgesOnPlane as c,
985
- approximateAsSvgCompatibleCurve as d,
986
- BoundingBox2d as e,
987
- edgeToCurve as f,
988
- make2dInerpolatedBSplineCurve as g,
989
- make2dCircle as h,
990
- make2dEllipse as i,
991
- deserializeCurve2D as j,
992
- approximateAsBSpline as k,
993
- isPoint2D as l,
994
- mirror as m,
957
+ BoundingBox2d as d,
958
+ edgeToCurve as e,
959
+ make2dInerpolatedBSplineCurve as f,
960
+ make2dCircle as g,
961
+ make2dEllipse as h,
962
+ deserializeCurve2D as i,
963
+ approximateAsBSpline as j,
964
+ isPoint2D as k,
965
+ make2dThreePointArc as l,
966
+ make2dSegmentCurve as m,
995
967
  normalize2d as n,
996
- make2dThreePointArc as o,
997
- asSVG as p,
998
- make2dEllipseArc as q,
999
- make2dTangentArc as r,
1000
- make2dBezierCurve as s,
1001
- removeDuplicatePoints as t,
1002
- makePlane as u,
968
+ asSVG as o,
969
+ make2dEllipseArc as p,
970
+ make2dTangentArc as q,
971
+ make2dBezierCurve as r,
972
+ removeDuplicatePoints as s,
1003
973
  viewbox as v
1004
974
  };
@@ -1,41 +1,13 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-D_IiZx0q.cjs");
2
+ const vectors = require("./vectors-C8N_QeEX.cjs");
3
+ const shapeTypes = require("./shapeTypes-owrg2MNK.cjs");
4
+ const faceFns = require("./faceFns-BAKkZG6D.cjs");
5
+ const curveFns = require("./curveFns-BwLvO_Ia.cjs");
6
+ const result = require("./result-DJAAj1yb.cjs");
7
+ const helpers = require("./helpers-DVdscQxW.cjs");
3
8
  const types = require("./types-CA_xrgDq.cjs");
4
- const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
5
- const faceFns = require("./faceFns-DB1Fc5gy.cjs");
6
- const curveFns = require("./curveFns-BZngcnQ1.cjs");
7
- const result = require("./result-fAX0OZzI.cjs");
8
- const helpers = require("./helpers-C8NoT0Wu.cjs");
9
9
  const vecOps = require("./vecOps-CjRL1jau.cjs");
10
- const surfaceBuilders = require("./surfaceBuilders-5VA34a3_.cjs");
11
- function makePlane(plane, origin) {
12
- if (plane && typeof plane !== "string") {
13
- return { ...plane };
14
- } else {
15
- return vectors.resolvePlane(plane ?? "XY", origin);
16
- }
17
- }
18
- function mirror(shape, inputPlane, origin) {
19
- let originVec;
20
- let directionVec;
21
- if (typeof inputPlane === "string") {
22
- const plane = vectors.resolvePlane(inputPlane, origin);
23
- originVec = plane.origin;
24
- directionVec = plane.zDir;
25
- } else if (inputPlane && typeof inputPlane === "object" && "origin" in inputPlane && "zDir" in inputPlane) {
26
- originVec = origin ? types.toVec3(origin) : inputPlane.origin;
27
- directionVec = inputPlane.zDir;
28
- } else if (inputPlane) {
29
- originVec = origin ? types.toVec3(origin) : [0, 0, 0];
30
- directionVec = types.toVec3(inputPlane);
31
- } else {
32
- const plane = vectors.resolvePlane("YZ", origin);
33
- originVec = plane.origin;
34
- directionVec = plane.zDir;
35
- }
36
- const newShape = shapeTypes.getKernel().mirror(shape, originVec, directionVec);
37
- return newShape;
38
- }
10
+ const surfaceBuilders = require("./surfaceBuilders-KU_7OD2q.cjs");
39
11
  function isPoint2D(point) {
40
12
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
41
13
  }
@@ -47,6 +19,9 @@ function precisionRound(number, precision) {
47
19
  function round2(v) {
48
20
  return Math.round(v * 100) / 100;
49
21
  }
22
+ function round5(v) {
23
+ return Math.round(v * 1e5) / 1e5;
24
+ }
50
25
  const reprPnt = ([x, y]) => {
51
26
  return `(${round2(x)},${round2(y)})`;
52
27
  };
@@ -138,12 +113,12 @@ class BoundingBox2d {
138
113
  return !shapeTypes.getKernel2D().isBBox2dOutPoint(this.wrapped, other[0], other[1]);
139
114
  }
140
115
  }
141
- const normalize2d = ([x0, y0]) => {
142
- const l = helpers.distance2d([x0, y0]);
143
- if (l < 1e-12) {
116
+ const normalize2d = ([x, y]) => {
117
+ const result$1 = helpers.normalize2d([x, y]);
118
+ if (result$1[0] === 0 && result$1[1] === 0) {
144
119
  result.bug("normalize2d", "Cannot normalize zero-length vector");
145
120
  }
146
- return [x0 / l, y0 / l];
121
+ return result$1;
147
122
  };
148
123
  function deserializeCurve2D(data) {
149
124
  return new Curve2D(shapeTypes.getKernel().deserializeCurve2d(data));
@@ -517,9 +492,6 @@ const make2dArcFromCenter = (startPoint, endPoint, center, longArc = false) => {
517
492
  endPoint
518
493
  );
519
494
  };
520
- function round5(v) {
521
- return Math.round(v * 1e5) / 1e5;
522
- }
523
495
  const adaptedCurveToPathElem = (curve, lastPoint) => {
524
496
  const k2d = shapeTypes.getKernel2D();
525
497
  const curveType = curve.geomType;
@@ -825,7 +797,7 @@ class Blueprint {
825
797
  * @returns Sketch data containing the projected wire and default orientation.
826
798
  */
827
799
  sketchOnPlane(inputPlane, origin) {
828
- const plane = inputPlane && typeof inputPlane !== "string" ? { ...inputPlane } : makePlane(inputPlane, origin);
800
+ const plane = inputPlane && typeof inputPlane !== "string" ? { ...inputPlane } : vectors.makePlane(inputPlane, origin);
829
801
  const edges = curvesAsEdgesOnPlane(this.curves, plane);
830
802
  const wire = assembleWire(edges);
831
803
  return {
@@ -996,8 +968,6 @@ exports.make2dInerpolatedBSplineCurve = make2dInerpolatedBSplineCurve;
996
968
  exports.make2dSegmentCurve = make2dSegmentCurve;
997
969
  exports.make2dTangentArc = make2dTangentArc;
998
970
  exports.make2dThreePointArc = make2dThreePointArc;
999
- exports.makePlane = makePlane;
1000
- exports.mirror = mirror;
1001
971
  exports.normalize2d = normalize2d;
1002
972
  exports.removeDuplicatePoints = removeDuplicatePoints;
1003
973
  exports.viewbox = viewbox;
@@ -44,17 +44,17 @@ var __callDispose = (stack, error, hasError) => {
44
44
  };
45
45
  return next();
46
46
  };
47
- const vectors = require("./vectors-D_IiZx0q.cjs");
48
- const result = require("./result-fAX0OZzI.cjs");
49
- const faceFns = require("./faceFns-DB1Fc5gy.cjs");
47
+ const vectors = require("./vectors-C8N_QeEX.cjs");
48
+ const result = require("./result-DJAAj1yb.cjs");
49
+ const faceFns = require("./faceFns-BAKkZG6D.cjs");
50
50
  const types = require("./types-CA_xrgDq.cjs");
51
51
  const vecOps = require("./vecOps-CjRL1jau.cjs");
52
- const loft = require("./loft-hp3pc1M7.cjs");
53
- const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
54
- const curveFns = require("./curveFns-BZngcnQ1.cjs");
55
- const surfaceBuilders = require("./surfaceBuilders-5VA34a3_.cjs");
56
- const helpers = require("./helpers-C8NoT0Wu.cjs");
57
- const Blueprint = require("./Blueprint-CQ28WJhz.cjs");
52
+ const loft = require("./loft-BNvBZzqe.cjs");
53
+ const shapeTypes = require("./shapeTypes-owrg2MNK.cjs");
54
+ const curveFns = require("./curveFns-BwLvO_Ia.cjs");
55
+ const surfaceBuilders = require("./surfaceBuilders-KU_7OD2q.cjs");
56
+ const helpers = require("./helpers-DVdscQxW.cjs");
57
+ const Blueprint = require("./Blueprint-CUyXM6CV.cjs");
58
58
  const intersectCurves = (first, second, precision = 1e-9) => {
59
59
  if (first.boundingBox.isOut(second.boundingBox))
60
60
  return result.ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
@@ -43,17 +43,17 @@ var __callDispose = (stack, error, hasError) => {
43
43
  };
44
44
  return next();
45
45
  };
46
- import { a as createPlane } from "./vectors-Bx8wkNui.js";
47
- import { o as ok, e as err, d as computationError, v as unwrap, h as isOk, C as safeIndex, b as bug } from "./result-BaSD1fqR.js";
48
- import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-B8GnxjdY.js";
49
- import { a as toVec3 } from "./types-CWDdqcrq.js";
50
- import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
51
- import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-Bhw-FMoL.js";
52
- import { J as getKernel2D, I as createFace, G as createWire, B as getKernel, H as createEdge, D as DisposalScope } from "./shapeTypes-CpSaBLDv.js";
53
- import { c as curveStartPoint, a as curveTangentAt, b as curveIsClosed } from "./curveFns-mROFhiuG.js";
54
- import { m as makeFace, h as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-nQdJ56fe.js";
55
- import { s as samePoint$1, e as subtract2d, c as add2d, h as crossProduct2d, b as scalarMultiply2d, p as polarToCartesian, r as rotate2d, i as cartesianToPolar, d as distance2d, j as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-X0juxnwj.js";
56
- import { C as Curve2D, a as make2dSegmentCurve, k as approximateAsBSpline, n as normalize2d, b as make2dArcFromCenter, l as isPoint2D, h as make2dCircle, o as make2dThreePointArc, e as BoundingBox2d, v as viewbox, p as asSVG, B as Blueprint, q as make2dEllipseArc, r as make2dTangentArc, s as make2dBezierCurve, t as removeDuplicatePoints } from "./Blueprint-DbVaf6k7.js";
46
+ import { c as createPlane } from "./vectors-DTREgnVp.js";
47
+ import { o as ok, e as err, d as computationError, u as unwrap, f as isOk, s as safeIndex, c as bug } from "./result-DtuwWSUD.js";
48
+ import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-DGMp47Os.js";
49
+ import { t as toVec3 } from "./types-CcKqsmd0.js";
50
+ import { b as vecScale, c as vecNormalize, e as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-LTN--A58.js";
51
+ import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-D0aCZRaB.js";
52
+ import { p as getKernel2D, n as createFace, l as createWire, g as getKernel, m as createEdge, D as DisposalScope } from "./shapeTypes-CAEAyk8j.js";
53
+ import { d as curveStartPoint, e as curveTangentAt, a as curveIsClosed } from "./curveFns-1u0oZ0u0.js";
54
+ import { c as makeFace, h as makeNewFaceWithinFace, a as assembleWire, z as zip } from "./surfaceBuilders-Dj6AjhOv.js";
55
+ import { s as samePoint$1, c as subtract2d, b as add2d, f as crossProduct2d, a as scalarMultiply2d, p as polarToCartesian, r as rotate2d, h as cartesianToPolar, d as distance2d, i as polarAngle2d, j as PRECISION_INTERSECTION } from "./helpers-sJjnIXDA.js";
56
+ import { C as Curve2D, m as make2dSegmentCurve, j as approximateAsBSpline, n as normalize2d, a as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, o as asSVG, B as Blueprint, p as make2dEllipseArc, q as make2dTangentArc, r as make2dBezierCurve, s as removeDuplicatePoints } from "./Blueprint-1HGbugaC.js";
57
57
  const intersectCurves = (first, second, precision = 1e-9) => {
58
58
  if (first.boundingBox.isOut(second.boundingBox))
59
59
  return ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
3
- const result = require("./result-fAX0OZzI.cjs");
4
- const vectors = require("./vectors-D_IiZx0q.cjs");
2
+ const shapeTypes = require("./shapeTypes-owrg2MNK.cjs");
3
+ const result = require("./result-DJAAj1yb.cjs");
4
+ const vectors = require("./vectors-C8N_QeEX.cjs");
5
5
  const vecOps = require("./vecOps-CjRL1jau.cjs");
6
- const shapeFns = require("./shapeFns-C2SnNvdH.cjs");
7
- const surfaceBuilders = require("./surfaceBuilders-5VA34a3_.cjs");
6
+ const originTrackingFns = require("./originTrackingFns-dhaCe8Yb.cjs");
7
+ const topologyQueryFns = require("./topologyQueryFns-fz5kz5e1.cjs");
8
+ const surfaceBuilders = require("./surfaceBuilders-KU_7OD2q.cjs");
8
9
  const shapeTagStore = /* @__PURE__ */ new WeakMap();
9
10
  const tagMetadataStore = /* @__PURE__ */ new WeakMap();
10
11
  function hasFaceTags(shape) {
@@ -27,7 +28,7 @@ function getMetaMap(shape) {
27
28
  return map;
28
29
  }
29
30
  function tagFaces(shape, selector, tag) {
30
- const faces = Array.isArray(selector) ? selector : shapeFns.getFaces(shape).filter(selector);
31
+ const faces = Array.isArray(selector) ? selector : topologyQueryFns.getFaces(shape).filter(selector);
31
32
  const tagMap = getTagMap(shape);
32
33
  const existing = tagMap.get(tag) ?? /* @__PURE__ */ new Set();
33
34
  for (const face of faces) {
@@ -42,7 +43,7 @@ function findFacesByTag(shape, tag) {
42
43
  const hashes = tagMap.get(tag);
43
44
  if (!hashes || hashes.size === 0) return [];
44
45
  const result2 = [];
45
- for (const face of shapeFns.getFaces(shape)) {
46
+ for (const face of topologyQueryFns.getFaces(shape)) {
46
47
  const hash = shapeTypes.getKernel().hashCode(face.wrapped, vecOps.HASH_CODE_MAX);
47
48
  if (hashes.has(hash)) {
48
49
  result2.push(face);
@@ -54,7 +55,7 @@ function getFaceTags(shape) {
54
55
  const result2 = /* @__PURE__ */ new Map();
55
56
  const tagMap = shapeTagStore.get(shape.wrapped);
56
57
  if (!tagMap) return result2;
57
- const faces = shapeFns.getFaces(shape);
58
+ const faces = topologyQueryFns.getFaces(shape);
58
59
  const faceByHash = /* @__PURE__ */ new Map();
59
60
  for (const face of faces) {
60
61
  faceByHash.set(shapeTypes.getKernel().hashCode(face.wrapped, vecOps.HASH_CODE_MAX), face);
@@ -196,6 +197,29 @@ function propagateColorsFromEvolution(evolution, inputs, result2) {
196
197
  }
197
198
  }
198
199
  }
200
+ function collectInputFaceHashes(inputs) {
201
+ const hasMetadata = inputs.some(
202
+ (s) => originTrackingFns.getFaceOrigins(s) !== void 0 || hasFaceTags(s) || hasColorMetadata(s)
203
+ );
204
+ if (!hasMetadata) return [];
205
+ const kernel = shapeTypes.getKernel();
206
+ const hashes = [];
207
+ for (const input of inputs) {
208
+ const faces = kernel.iterShapes(input.wrapped, "face");
209
+ for (const face of faces) {
210
+ hashes.push(kernel.hashCode(face, vecOps.HASH_CODE_MAX));
211
+ }
212
+ }
213
+ return hashes;
214
+ }
215
+ function propagateAllMetadata(evolution, inputs, result2) {
216
+ originTrackingFns.propagateOriginsFromEvolution(evolution, inputs, result2);
217
+ propagateFaceTagsFromEvolution(evolution, inputs, result2);
218
+ propagateColorsFromEvolution(evolution, inputs, result2);
219
+ }
220
+ function propagateMetadataByHash(inputs, result2) {
221
+ originTrackingFns.propagateOriginsByHash(inputs, result2);
222
+ }
199
223
  function validateShape3D(shape, label) {
200
224
  if (shapeTypes.getKernel().isNull(shape.wrapped)) {
201
225
  return result.err(result.validationError(result.BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
@@ -223,20 +247,6 @@ function castToShape3D(shape, errorCode, errorMsg) {
223
247
  }
224
248
  return result.ok(wrapped);
225
249
  }
226
- function collectInputFaceHashes(inputs) {
227
- const hasMetadata = inputs.some(
228
- (s) => shapeFns.getFaceOrigins(s) !== void 0 || hasFaceTags(s) || hasColorMetadata(s)
229
- );
230
- if (!hasMetadata) return [];
231
- const hashes = [];
232
- for (const input of inputs) {
233
- const faces = shapeTypes.getKernel().iterShapes(input.wrapped, "face");
234
- for (const face of faces) {
235
- hashes.push(face.HashCode(vecOps.HASH_CODE_MAX));
236
- }
237
- }
238
- return hashes;
239
- }
240
250
  function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValue } = {}) {
241
251
  if (signal?.aborted) throw signal.reason;
242
252
  const checkA = validateShape3D(a, "fuse: first operand");
@@ -253,9 +263,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
253
263
  );
254
264
  const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape");
255
265
  if (fuseResult.ok) {
256
- shapeFns.propagateOriginsFromEvolution(evolution, [a, b], fuseResult.value);
257
- propagateFaceTagsFromEvolution(evolution, [a, b], fuseResult.value);
258
- propagateColorsFromEvolution(evolution, [a, b], fuseResult.value);
266
+ propagateAllMetadata(evolution, [a, b], fuseResult.value);
259
267
  }
260
268
  return fuseResult;
261
269
  }
@@ -275,9 +283,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
275
283
  );
276
284
  const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape");
277
285
  if (cutResult.ok) {
278
- shapeFns.propagateOriginsFromEvolution(evolution, [base, tool], cutResult.value);
279
- propagateFaceTagsFromEvolution(evolution, [base, tool], cutResult.value);
280
- propagateColorsFromEvolution(evolution, [base, tool], cutResult.value);
286
+ propagateAllMetadata(evolution, [base, tool], cutResult.value);
281
287
  }
282
288
  return cutResult;
283
289
  }
@@ -301,9 +307,7 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue } = {}) {
301
307
  "Intersect did not produce a 3D shape"
302
308
  );
303
309
  if (intResult.ok) {
304
- shapeFns.propagateOriginsFromEvolution(evolution, [a, b], intResult.value);
305
- propagateFaceTagsFromEvolution(evolution, [a, b], intResult.value);
306
- propagateColorsFromEvolution(evolution, [a, b], intResult.value);
310
+ propagateAllMetadata(evolution, [a, b], intResult.value);
307
311
  }
308
312
  return intResult;
309
313
  }
@@ -375,7 +379,7 @@ function fuseAll(shapes, {
375
379
  "fuseAll did not produce a 3D shape"
376
380
  );
377
381
  if (fuseAllResult.ok) {
378
- shapeFns.propagateOriginsByHash(shapes, fuseAllResult.value);
382
+ propagateMetadataByHash(shapes, fuseAllResult.value);
379
383
  }
380
384
  return fuseAllResult;
381
385
  }
@@ -407,7 +411,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal,
407
411
  );
408
412
  const cutAllResult = castToShape3D(result$1, "CUT_ALL_NOT_3D", "cutAll did not produce a 3D shape");
409
413
  if (cutAllResult.ok) {
410
- shapeFns.propagateOriginsByHash(allInputs, cutAllResult.value);
414
+ propagateMetadataByHash(allInputs, cutAllResult.value);
411
415
  }
412
416
  return cutAllResult;
413
417
  }
@@ -461,9 +465,9 @@ function section(shape, plane, { approximation = true, planeSize = 1e4 } = {}) {
461
465
  function sectionToFace(shape, plane, options = {}) {
462
466
  const sectionResult = section(shape, plane, options);
463
467
  if (!sectionResult.ok) return sectionResult;
464
- const wires = shapeFns.getWires(sectionResult.value);
468
+ const wires = topologyQueryFns.getWires(sectionResult.value);
465
469
  if (wires.length === 0) {
466
- const edges = shapeFns.getEdges(sectionResult.value);
470
+ const edges = topologyQueryFns.getEdges(sectionResult.value);
467
471
  if (edges.length === 0) {
468
472
  return result.err(result.kernelError("SECTION_FAILED", "sectionToFace: section produced no geometry"));
469
473
  }
@@ -471,7 +475,7 @@ function sectionToFace(shape, plane, options = {}) {
471
475
  const vertexToEdges = /* @__PURE__ */ new Map();
472
476
  const edgeVertexHashes = /* @__PURE__ */ new Map();
473
477
  for (const edge of edges) {
474
- const verts = shapeFns.getVertices(edge);
478
+ const verts = topologyQueryFns.getVertices(edge);
475
479
  const h0 = verts[0] ? shapeTypes.getKernel().hashCode(verts[0].wrapped, vecOps.HASH_CODE_MAX) : -1;
476
480
  const h1 = verts.length > 1 && verts[1] ? shapeTypes.getKernel().hashCode(verts[1].wrapped, vecOps.HASH_CODE_MAX) : h0;
477
481
  edgeVertexHashes.set(edge, [h0, h1]);
@@ -582,6 +586,7 @@ function slice(shape, planes, options = {}) {
582
586
  }
583
587
  return result.ok(results);
584
588
  }
589
+ exports.collectInputFaceHashes = collectInputFaceHashes;
585
590
  exports.colorFaces = colorFaces;
586
591
  exports.colorShape = colorShape;
587
592
  exports.cut = cut;
@@ -593,11 +598,9 @@ exports.getFaceColor = getFaceColor;
593
598
  exports.getFaceTags = getFaceTags;
594
599
  exports.getShapeColor = getShapeColor;
595
600
  exports.getTagMetadata = getTagMetadata;
596
- exports.hasColorMetadata = hasColorMetadata;
597
- exports.hasFaceTags = hasFaceTags;
598
601
  exports.intersect = intersect;
599
- exports.propagateColorsFromEvolution = propagateColorsFromEvolution;
600
- exports.propagateFaceTagsFromEvolution = propagateFaceTagsFromEvolution;
602
+ exports.propagateAllMetadata = propagateAllMetadata;
603
+ exports.propagateMetadataByHash = propagateMetadataByHash;
601
604
  exports.section = section;
602
605
  exports.sectionToFace = sectionToFace;
603
606
  exports.setTagMetadata = setTagMetadata;