brepjs 18.119.2 → 18.119.3

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 (96) hide show
  1. package/dist/2d/lib/curve2D.d.ts +6 -1
  2. package/dist/2d/lib/curve2dFns.d.ts +6 -1
  3. package/dist/2d.cjs +7 -7
  4. package/dist/2d.js +7 -7
  5. package/dist/{adjacencyFns-BdM5p58J.js → adjacencyFns-DLityMyV.js} +2 -2
  6. package/dist/{adjacencyFns-Brrc7jlS.cjs → adjacencyFns-DSxuQYnb.cjs} +2 -2
  7. package/dist/{blueprint-DTNT4qYJ.cjs → blueprint-BGcBMy3b.cjs} +39 -9
  8. package/dist/{blueprint-DJJo8WkI.js → blueprint-CAG6jseD.js} +33 -9
  9. package/dist/{blueprintFns-CcpboZ80.js → blueprintFns-B4C3zH7N.js} +9 -4
  10. package/dist/{blueprintFns-2XDZfCxX.cjs → blueprintFns-CnoqynzI.cjs} +9 -4
  11. package/dist/{blueprintSketcher-C0EXFVb2.cjs → blueprintSketcher-BNz6f36D.cjs} +166 -61
  12. package/dist/{blueprintSketcher-DDPyypmC.js → blueprintSketcher-CKKxvxB-.js} +159 -54
  13. package/dist/{boolean2D-Ddfo_dd0.cjs → boolean2D-B-0xobBP.cjs} +5 -5
  14. package/dist/{boolean2D-C_PVz8xT.js → boolean2D-C_1gMcZ6.js} +5 -5
  15. package/dist/brepjs.cjs +105 -92
  16. package/dist/brepjs.js +39 -27
  17. package/dist/{cameraFns-Czr5vABD.cjs → cameraFns-2-haLzLi.cjs} +4 -4
  18. package/dist/{cameraFns-D9tdBYLM.js → cameraFns-CG_J66Hl.js} +4 -4
  19. package/dist/core.cjs +12 -11
  20. package/dist/core.js +4 -3
  21. package/dist/{cornerFinder-Cqg-Dz74.js → cornerFinder-CPFM7bA0.js} +1 -1
  22. package/dist/{cornerFinder-DETRDOMz.cjs → cornerFinder-mfsUMi5g.cjs} +1 -1
  23. package/dist/{curveFns-RENXKp64.js → curveFns-DX13KRh2.js} +2 -2
  24. package/dist/{curveFns-D7utcbnf.cjs → curveFns-GmFnqNo3.cjs} +2 -2
  25. package/dist/{drawFns-D9Rf4foW.cjs → drawFns-B14M5M68.cjs} +14 -14
  26. package/dist/{drawFns-B9HbtAoc.js → drawFns-BShGVVXW.js} +14 -14
  27. package/dist/{errors-B3CDG537.js → errors-MHLiNE-C.js} +1 -92
  28. package/dist/{errors-CJU8CHng.cjs → errors-RHkKO5bZ.cjs} +0 -103
  29. package/dist/{faceFns-CPswi9Cm.cjs → faceFns-BK4r7Dxk.cjs} +3 -3
  30. package/dist/{faceFns-CB6uzvOg.js → faceFns-DJj9Nb6T.js} +3 -3
  31. package/dist/{healingFns-BFTYLiAm.js → healingFns-DxcRyVCG.js} +5 -6
  32. package/dist/{healingFns-bhMxTTqw.cjs → healingFns-Hx4oTlq8.cjs} +27 -28
  33. package/dist/{helpers-Cu4ag5bh.cjs → helpers-BfkBvokP.cjs} +8 -24
  34. package/dist/{helpers-BiN4qQZP.js → helpers-Du_OdHuy.js} +9 -25
  35. package/dist/{importFns-X8vBhZI2.js → importFns-BHs19muu.js} +3 -3
  36. package/dist/{importFns-DS4J1xLv.cjs → importFns-GySbuvVv.cjs} +3 -3
  37. package/dist/io.cjs +2 -2
  38. package/dist/io.js +2 -2
  39. package/dist/{loftFns-ChHjzUK-.cjs → loftFns-BdpZ8FMN.cjs} +2 -125
  40. package/dist/{loftFns-BF5X7ltI.js → loftFns-BeGJ6dxx.js} +4 -109
  41. package/dist/{measureFns-B5Zzg1qM.cjs → measureFns-CJGrmhHT.cjs} +4 -4
  42. package/dist/{measureFns-CC7HhAH3.js → measureFns-CMnbcUZC.js} +4 -4
  43. package/dist/measurement.cjs +1 -1
  44. package/dist/measurement.js +1 -1
  45. package/dist/{meshFns-D57Fyqyf.js → meshFns-Cs5EBsf7.js} +4 -4
  46. package/dist/{meshFns-CaXmWmhe.cjs → meshFns-Dqf5QBhQ.cjs} +5 -5
  47. package/dist/operations.cjs +2 -2
  48. package/dist/operations.js +2 -2
  49. package/dist/originTrackingFns-DZmdiQ-O.js +203 -0
  50. package/dist/originTrackingFns-fpEgTIwV.cjs +226 -0
  51. package/dist/{planeOps-Cp6GQ23-.js → planeOps-CQahLrCx.js} +1 -1
  52. package/dist/{planeOps-Cr25KWWA.cjs → planeOps-VlFxtvzY.cjs} +1 -1
  53. package/dist/primitiveFns-B_rflH83.cjs +773 -0
  54. package/dist/primitiveFns-Cxo3xDKY.js +558 -0
  55. package/dist/projection.cjs +1 -1
  56. package/dist/projection.js +1 -1
  57. package/dist/query.cjs +2 -2
  58. package/dist/query.js +2 -2
  59. package/dist/{refResolveFns-3bw9-U-e.js → refResolveFns-BbRLD8LA.js} +6 -6
  60. package/dist/{refResolveFns-BxmgIhQM.cjs → refResolveFns-CVDLwh12.cjs} +6 -6
  61. package/dist/result.cjs +1 -1
  62. package/dist/result.js +1 -1
  63. package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
  64. package/dist/shapeFns-BTFx-os7.js +43 -0
  65. package/dist/shapeFns-D_5TgiUi.cjs +84 -0
  66. package/dist/shapeRef.cjs +1 -1
  67. package/dist/shapeRef.js +1 -1
  68. package/dist/{shapeTypes-Bpsu5KJO.cjs → shapeTypes-CkcIL7zv.cjs} +1 -222
  69. package/dist/{shapeTypes-CnKFSfDT.js → shapeTypes-t49f64Dx.js} +2 -139
  70. package/dist/sketching.cjs +3 -3
  71. package/dist/sketching.js +3 -3
  72. package/dist/{solidBuilders-I8_V8qqU.js → solidBuilders-DTgqQC3W.js} +310 -8
  73. package/dist/{solidBuilders-Bp7lQW62.cjs → solidBuilders-IiIzjKAr.cjs} +401 -15
  74. package/dist/{surfaceBuilders-D8_08oOR.cjs → surfaceBuilders-Biqx51el.cjs} +6 -5
  75. package/dist/{surfaceBuilders-BNR7yMQO.js → surfaceBuilders-BryY-i0F.js} +4 -3
  76. package/dist/text.cjs +2 -2
  77. package/dist/text.js +2 -2
  78. package/dist/{textBlueprints-B5zcLGvJ.cjs → textBlueprints-8EcWreab.cjs} +138 -51
  79. package/dist/{textBlueprints-igbNvKcd.js → textBlueprints-rA1HT6j1.js} +116 -11
  80. package/dist/{textMetrics-CJvtpbc3.js → textMetrics-Bcbso1Ns.js} +2 -2
  81. package/dist/{textMetrics-08fF0QNf.cjs → textMetrics-GPBu9JKi.cjs} +2 -2
  82. package/dist/{threadFns-CqSMNyTZ.js → threadFns-BOtXTHZ9.js} +8 -8
  83. package/dist/{threadFns-Co6vWEWx.cjs → threadFns-DRrk9Qod.cjs} +8 -8
  84. package/dist/topology.cjs +9 -9
  85. package/dist/topology.js +9 -9
  86. package/dist/{topologyQueryFns-C3fhJndG.cjs → topologyQueryFns-Bia7o8l_.cjs} +97 -6
  87. package/dist/{topologyQueryFns-DNqT88yx.js → topologyQueryFns-BkQ6Q7gN.js} +93 -2
  88. package/dist/validityTypes-DiTgeCD9.js +129 -0
  89. package/dist/validityTypes-ZGMVlv7b.cjs +200 -0
  90. package/dist/vectors.cjs +1 -1
  91. package/dist/vectors.js +1 -1
  92. package/package.json +8 -8
  93. package/dist/primitiveFns-CRy_CUVg.cjs +0 -492
  94. package/dist/primitiveFns-DCIH-SBm.js +0 -331
  95. package/dist/shapeFns-BrHFNLMA.js +0 -771
  96. package/dist/shapeFns-qm9VRo4i.cjs +0 -962
@@ -1,13 +1,315 @@
1
- import { C as isSolid, R as getShapeKind, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, i as castShape, it as getKernel, m as disposeDowncastSource, n as castResultShape, nt as _usingCtx, s as createCompound, x as isShape3D } from "./shapeTypes-CnKFSfDT.js";
2
- import { I as unwrap, O as ok, S as isErr, d as validationError, g as andThen, i as kernelError, l as typeCastError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
3
- import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-DNqT88yx.js";
1
+ import { C as isSolid, E as getShapeKind, K as getKernel, S as isShell, W as _usingCtx, d as createSolid, f as createVertex, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, s as createCompound, x as isShape3D } from "./shapeTypes-t49f64Dx.js";
2
+ import { E as ok, P as unwrap, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, m as andThen, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
3
+ import { S as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BkQ6Q7gN.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
5
  import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
6
- import { o as resolvePlane } from "./planeOps-Cp6GQ23-.js";
7
- import { _ as cast, y as downcast } from "./faceFns-CB6uzvOg.js";
8
- import { _ as collectInputFaceHashes, b as propagateMetadataByHash, y as propagateAllMetadata } from "./shapeFns-BrHFNLMA.js";
6
+ import { o as resolvePlane } from "./planeOps-CQahLrCx.js";
7
+ import { _ as cast, y as downcast } from "./faceFns-DJj9Nb6T.js";
8
+ import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-DZmdiQ-O.js";
9
9
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-BNR7yMQO.js";
10
+ import { r as makeFace } from "./surfaceBuilders-BryY-i0F.js";
11
+ //#region src/topology/metadata/faceTagFns.ts
12
+ var shapeTagStore = /* @__PURE__ */ new WeakMap();
13
+ var tagMetadataStore = /* @__PURE__ */ new WeakMap();
14
+ /** O(1) check whether a shape has any face tags attached. */
15
+ function hasFaceTags(shape) {
16
+ return shapeTagStore.has(shape.wrapped);
17
+ }
18
+ function getTagMap(shape) {
19
+ let map = shapeTagStore.get(shape.wrapped);
20
+ if (!map) {
21
+ map = /* @__PURE__ */ new Map();
22
+ shapeTagStore.set(shape.wrapped, map);
23
+ }
24
+ return map;
25
+ }
26
+ function getMetaMap(shape) {
27
+ let map = tagMetadataStore.get(shape.wrapped);
28
+ if (!map) {
29
+ map = /* @__PURE__ */ new Map();
30
+ tagMetadataStore.set(shape.wrapped, map);
31
+ }
32
+ return map;
33
+ }
34
+ /**
35
+ * Tag selected faces with a string name.
36
+ *
37
+ * @param shape - The shape containing the faces.
38
+ * @param selector - Array of faces, or a predicate function.
39
+ * @param tag - The tag name to assign.
40
+ * @returns The same shape (tags are stored externally).
41
+ */
42
+ function tagFaces(shape, selector, tag) {
43
+ const faces = Array.isArray(selector) ? selector : getFaces(shape).filter(selector);
44
+ const tagMap = getTagMap(shape);
45
+ const existing = tagMap.get(tag) ?? /* @__PURE__ */ new Set();
46
+ for (const face of faces) existing.add(getKernel().hashCode(face.wrapped, HASH_CODE_MAX));
47
+ tagMap.set(tag, existing);
48
+ return shape;
49
+ }
50
+ /**
51
+ * Find all faces on a shape that have the given tag.
52
+ *
53
+ * Checks both direct tags and propagated origins (for faces that
54
+ * survived boolean/modifier operations).
55
+ */
56
+ function findFacesByTag(shape, tag) {
57
+ const tagMap = shapeTagStore.get(shape.wrapped);
58
+ if (!tagMap) return [];
59
+ const hashes = tagMap.get(tag);
60
+ if (!hashes || hashes.size === 0) return [];
61
+ const result = [];
62
+ for (const face of getFaces(shape)) {
63
+ const hash = getKernel().hashCode(face.wrapped, HASH_CODE_MAX);
64
+ if (hashes.has(hash)) result.push(face);
65
+ }
66
+ return result;
67
+ }
68
+ /**
69
+ * Get all tags and their associated faces on a shape.
70
+ */
71
+ function getFaceTags(shape) {
72
+ const result = /* @__PURE__ */ new Map();
73
+ const tagMap = shapeTagStore.get(shape.wrapped);
74
+ if (!tagMap) return result;
75
+ const faces = getFaces(shape);
76
+ const faceByHash = /* @__PURE__ */ new Map();
77
+ for (const face of faces) faceByHash.set(getKernel().hashCode(face.wrapped, HASH_CODE_MAX), face);
78
+ for (const [tag, hashes] of tagMap) {
79
+ const taggedFaces = [];
80
+ for (const hash of hashes) {
81
+ const face = faceByHash.get(hash);
82
+ if (face) taggedFaces.push(face);
83
+ }
84
+ if (taggedFaces.length > 0) result.set(tag, taggedFaces);
85
+ }
86
+ return result;
87
+ }
88
+ /**
89
+ * Store arbitrary metadata for a tag on a shape.
90
+ */
91
+ function setTagMetadata(shape, tag, metadata) {
92
+ getMetaMap(shape).set(tag, metadata);
93
+ return shape;
94
+ }
95
+ /**
96
+ * Retrieve metadata for a tag on a shape.
97
+ */
98
+ function getTagMetadata(shape, tag) {
99
+ return tagMetadataStore.get(shape.wrapped)?.get(tag);
100
+ }
101
+ function addTagToResult(resultTagMap, tag, hash) {
102
+ const set = resultTagMap.get(tag) ?? /* @__PURE__ */ new Set();
103
+ set.add(hash);
104
+ resultTagMap.set(tag, set);
105
+ }
106
+ /**
107
+ * Propagate face tags from input shapes to a result shape using a
108
+ * kernel-provided ShapeEvolution record (no direct kernel op access needed).
109
+ */
110
+ function propagateFaceTagsFromEvolution(evolution, inputs, result) {
111
+ const resultTagMap = getTagMap(result);
112
+ for (const input of inputs) {
113
+ const inputTagMap = shapeTagStore.get(input.wrapped);
114
+ if (!inputTagMap) continue;
115
+ const hashToTags = /* @__PURE__ */ new Map();
116
+ for (const [tag, hashes] of inputTagMap) for (const hash of hashes) {
117
+ const tags = hashToTags.get(hash) ?? [];
118
+ tags.push(tag);
119
+ hashToTags.set(hash, tags);
120
+ }
121
+ for (const [hash, tags] of hashToTags) {
122
+ if (evolution.deleted.has(hash)) continue;
123
+ const modifiedHashes = evolution.modified.get(hash);
124
+ const targetHashes = modifiedHashes && modifiedHashes.length > 0 ? modifiedHashes : [hash];
125
+ for (const targetHash of targetHashes) for (const tag of tags) addTagToResult(resultTagMap, tag, targetHash);
126
+ }
127
+ const inputMetaMap = tagMetadataStore.get(input.wrapped);
128
+ if (inputMetaMap) {
129
+ const resultMetaMap = getMetaMap(result);
130
+ for (const [tag, meta] of inputMetaMap) if (!resultMetaMap.has(tag)) resultMetaMap.set(tag, meta);
131
+ }
132
+ }
133
+ }
134
+ //#endregion
135
+ //#region src/topology/metadata/colorFns.ts
136
+ var shapeColorStore = /* @__PURE__ */ new WeakMap();
137
+ var faceColorStore = /* @__PURE__ */ new WeakMap();
138
+ /** O(1) check whether a shape has any color metadata (shape or face level). */
139
+ function hasColorMetadata(shape) {
140
+ return shapeColorStore.has(shape.wrapped) || faceColorStore.has(shape.wrapped);
141
+ }
142
+ function getFaceColorMap(shape) {
143
+ let map = faceColorStore.get(shape.wrapped);
144
+ if (!map) {
145
+ map = /* @__PURE__ */ new Map();
146
+ faceColorStore.set(shape.wrapped, map);
147
+ }
148
+ return map;
149
+ }
150
+ function parseColor(input) {
151
+ if (typeof input === "string") {
152
+ let hex = input.startsWith("#") ? input.slice(1) : input;
153
+ if (hex.length === 3) hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2);
154
+ return [
155
+ parseInt(hex.slice(0, 2), 16) / 255,
156
+ parseInt(hex.slice(2, 4), 16) / 255,
157
+ parseInt(hex.slice(4, 6), 16) / 255,
158
+ 1
159
+ ];
160
+ }
161
+ if (input.length === 3) return [
162
+ input[0],
163
+ input[1],
164
+ input[2],
165
+ 1
166
+ ];
167
+ return [
168
+ input[0],
169
+ input[1],
170
+ input[2],
171
+ input[3]
172
+ ];
173
+ }
174
+ /**
175
+ * Set a whole-shape color (stored externally via WeakMap).
176
+ * Returns the same shape reference.
177
+ */
178
+ function colorShape(shape, color) {
179
+ shapeColorStore.set(shape.wrapped, parseColor(color));
180
+ return shape;
181
+ }
182
+ /**
183
+ * Set per-face colors on a shape.
184
+ * Returns the same shape reference.
185
+ */
186
+ function colorFaces(shape, faces, color) {
187
+ const parsed = parseColor(color);
188
+ const map = getFaceColorMap(shape);
189
+ for (const face of faces) map.set(getKernel().hashCode(face.wrapped, HASH_CODE_MAX), parsed);
190
+ return shape;
191
+ }
192
+ /**
193
+ * Get the whole-shape color, or undefined if none set.
194
+ */
195
+ function getShapeColor(shape) {
196
+ return shapeColorStore.get(shape.wrapped);
197
+ }
198
+ /**
199
+ * Get the color of a specific face, or undefined if none set.
200
+ */
201
+ function getFaceColor(shape, face) {
202
+ const map = faceColorStore.get(shape.wrapped);
203
+ if (!map) return void 0;
204
+ return map.get(getKernel().hashCode(face.wrapped, HASH_CODE_MAX));
205
+ }
206
+ /**
207
+ * Propagate colors from input shapes to a result shape using a
208
+ * kernel-provided ShapeEvolution record (no direct kernel op access needed).
209
+ */
210
+ function propagateColorsFromEvolution(evolution, inputs, result) {
211
+ for (const input of inputs) {
212
+ const c = shapeColorStore.get(input.wrapped);
213
+ if (c) {
214
+ shapeColorStore.set(result.wrapped, c);
215
+ break;
216
+ }
217
+ }
218
+ const resultFaceMap = getFaceColorMap(result);
219
+ for (const input of inputs) {
220
+ const inputFaceMap = faceColorStore.get(input.wrapped);
221
+ if (!inputFaceMap || inputFaceMap.size === 0) continue;
222
+ for (const [hash, color] of inputFaceMap) {
223
+ if (evolution.deleted.has(hash)) continue;
224
+ const modifiedHashes = evolution.modified.get(hash);
225
+ if (modifiedHashes && modifiedHashes.length > 0) for (const modHash of modifiedHashes) resultFaceMap.set(modHash, color);
226
+ else resultFaceMap.set(hash, color);
227
+ }
228
+ }
229
+ }
230
+ //#endregion
231
+ //#region src/topology/metadata/metadataPropagation.ts
232
+ /**
233
+ * Collect ALL face hashes from input shapes for WithHistory kernel methods.
234
+ *
235
+ * Fast-path: returns empty array when no inputs have any metadata (origins,
236
+ * tags, or colors), avoiding expensive WASM topology exploration.
237
+ */
238
+ /**
239
+ * O(1) check: does a shape carry any propagatable metadata (face origins,
240
+ * tags, or colors)? Lets callers skip both expensive face iteration and
241
+ * metadata-preserving slow paths when there's nothing to preserve.
242
+ */
243
+ function hasAnyMetadata(shape) {
244
+ return getFaceOrigins(shape) !== void 0 || hasFaceTags(shape) || hasColorMetadata(shape);
245
+ }
246
+ function collectInputFaceHashes(inputs) {
247
+ if (!inputs.some(hasAnyMetadata)) return [];
248
+ const hashes = [];
249
+ for (const input of inputs) hashes.push(...subShapeHashes(input, "face"));
250
+ return hashes;
251
+ }
252
+ /**
253
+ * Propagate all metadata (origins, tags, colors) from inputs to result
254
+ * using a kernel-provided ShapeEvolution record.
255
+ *
256
+ * This is the standard pipeline for any operation that returns
257
+ * `{ shape, evolution }` from a WithHistory kernel method.
258
+ */
259
+ function propagateAllMetadata(evolution, inputs, result) {
260
+ propagateOriginsFromEvolution(evolution, inputs, result);
261
+ propagateFaceTagsFromEvolution(evolution, inputs, result);
262
+ propagateColorsFromEvolution(evolution, inputs, result);
263
+ }
264
+ /**
265
+ * Fallback metadata propagation when no ShapeEvolution is available.
266
+ *
267
+ * Matches result faces to input faces by hash code (and geometric fallback).
268
+ * Used by operations that don't support WithHistory (e.g., native fuseAll).
269
+ *
270
+ * **Limitation:** Only propagates face origins. Face tags and face colors
271
+ * require a ShapeEvolution record to map input→output face hashes, so they
272
+ * are lost through this path. Batch booleans (`fuseAll`, `cutAll`) therefore
273
+ * have weaker metadata guarantees than pairwise booleans (`fuse`, `cut`).
274
+ */
275
+ function propagateMetadataByHash(inputs, result) {
276
+ propagateOriginsByHash(inputs, result);
277
+ }
278
+ /**
279
+ * Propagate all metadata through a *rigid relocation* (a `locate` re-tag).
280
+ *
281
+ * A relocated shape shares the source's TShape, so its faces correspond 1:1 to
282
+ * the source faces in iteration order — but carry new, location-dependent
283
+ * hashes, so the hash-keyed metadata must be re-keyed rather than left as-is.
284
+ * This synthesizes a 1:1 `modified` evolution (source face hash → moved face
285
+ * hash) and runs the standard propagation pipeline, so origins, tags, and
286
+ * colors all survive a move at `locate` cost (O(faces)), not a full copy.
287
+ *
288
+ * Callers should gate on {@link hasAnyMetadata} first: with no metadata this
289
+ * does pointless face iteration. The face counts always match for a rigid
290
+ * relocation; the length guard is purely defensive.
291
+ */
292
+ function propagateMetadataThroughRelocation(source, moved) {
293
+ const kernel = getKernel();
294
+ const srcFaces = [...kernel.iterShapes(source.wrapped, "face")];
295
+ const movedFaces = [...kernel.iterShapes(moved.wrapped, "face")];
296
+ if (srcFaces.length !== movedFaces.length) return;
297
+ const modified = /* @__PURE__ */ new Map();
298
+ for (let i = 0; i < srcFaces.length; i++) {
299
+ const sf = srcFaces[i];
300
+ const mf = movedFaces[i];
301
+ if (sf === void 0 || mf === void 0) continue;
302
+ modified.set(kernel.hashCode(sf, HASH_CODE_MAX), [kernel.hashCode(mf, HASH_CODE_MAX)]);
303
+ }
304
+ for (const f of srcFaces) kernel.dispose(f);
305
+ for (const f of movedFaces) kernel.dispose(f);
306
+ propagateAllMetadata({
307
+ modified,
308
+ generated: /* @__PURE__ */ new Map(),
309
+ deleted: /* @__PURE__ */ new Set()
310
+ }, [source], moved);
311
+ }
312
+ //#endregion
11
313
  //#region src/topology/booleanFns.ts
12
314
  /**
13
315
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -654,4 +956,4 @@ function makeSolid(facesOrShells) {
654
956
  }
655
957
  }
656
958
  //#endregion
657
- export { section as _, makeOffset as a, split as b, makeTorus as c, booleanPipeline as d, cut as f, intersect as g, fuseAll as h, makeEllipsoid as i, makeVertex as l, fuse as m, makeCone as n, makeSolid as o, cutAll as p, makeCylinder as r, makeSphere as s, makeCompound as t, weldShellsAndFaces as u, sectionToFace as v, slice as y };
959
+ export { findFacesByTag as A, propagateAllMetadata as C, colorShape as D, colorFaces as E, getTagMetadata as M, setTagMetadata as N, getFaceColor as O, tagFaces as P, hasAnyMetadata as S, propagateMetadataThroughRelocation as T, section as _, makeOffset as a, split as b, makeTorus as c, booleanPipeline as d, cut as f, intersect as g, fuseAll as h, makeEllipsoid as i, getFaceTags as j, getShapeColor as k, makeVertex as l, fuse as m, makeCone as n, makeSolid as o, cutAll as p, makeCylinder as r, makeSphere as s, makeCompound as t, weldShellsAndFaces as u, sectionToFace as v, propagateMetadataByHash as w, collectInputFaceHashes as x, slice as y };