brepjs 18.113.0 → 18.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/brepjs.js CHANGED
@@ -13,8 +13,8 @@ import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as get
13
13
  import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-DbmidUzH.js";
14
14
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
15
15
  import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-rkE-jE90.js";
16
- import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$3, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-C32wXQWG.js";
17
- import { A as edgesOfFace, B as toLODGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as verticesOfFace, H as toLineGeometryData, I as wiresOfFace, L as chamferDistAngle, M as facesOfVertex, N as sharedEdges, O as getNurbsSurfaceData, P as verticesOfEdge, R as toBufferGeometryData, S as intersectWithEvolution, T as cutAllBisect, V as toLODGeometryLevels, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toGroupedBufferGeometryData } from "./healingFns-D00TPE9p.js";
16
+ import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-C32wXQWG.js";
17
+ import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-2TJHHDg5.js";
18
18
  import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, 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, p as serializeHistory, q as exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-bCOhVQLb.js";
19
19
  import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-7rtwqUHZ.js";
20
20
  import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DhJwFrkC.js";
@@ -28,7 +28,8 @@ import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrude
28
28
  import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-BnkWAqwS.js";
29
29
  import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-bk9e0F-T.js";
30
30
  import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-COGYk0LE.js";
31
- import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-ChMnsOAF.js";
31
+ import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-BYnyXXqt.js";
32
+ import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-CayDQeug.js";
32
33
  import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-XcYX2UZ0.js";
33
34
  import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-CBrOyk5S.js";
34
35
  //#region \0rolldown/runtime.js
@@ -1186,390 +1187,6 @@ function withKernelDir(v, fn) {
1186
1187
  }
1187
1188
  }
1188
1189
  //#endregion
1189
- //#region src/topology/shapeRef/roleLookup.ts
1190
- /** Euclidean distance between two points. */
1191
- function distance(a, b) {
1192
- const dx = a[0] - b[0];
1193
- const dy = a[1] - b[1];
1194
- const dz = a[2] - b[2];
1195
- return Math.sqrt(dx * dx + dy * dy + dz * dz);
1196
- }
1197
- /** Mean of a set of vertices' positions (e.g. an edge's endpoints). */
1198
- function vertexCentroid(verts) {
1199
- if (verts.length === 0) return void 0;
1200
- let x = 0;
1201
- let y = 0;
1202
- let z = 0;
1203
- for (const v of verts) {
1204
- const p = vertexPosition(v);
1205
- x += p[0];
1206
- y += p[1];
1207
- z += p[2];
1208
- }
1209
- const n = verts.length;
1210
- return [
1211
- x / n,
1212
- y / n,
1213
- z / n
1214
- ];
1215
- }
1216
- /** The role whose tracked hashes include this face (reverse lookup). */
1217
- function roleOfFace(face, origin, roles) {
1218
- const originRoles = roles.get(origin);
1219
- if (!originRoles) return void 0;
1220
- const hash = getHashCode(face);
1221
- for (const [role, hashes] of originRoles) if (hashes.includes(hash)) return role;
1222
- }
1223
- /** Current faces a role resolves to — its tracked successors present in `shape`. */
1224
- function facesForRole(shape, origin, role, roles) {
1225
- const hashes = roles.get(origin)?.get(role);
1226
- if (hashes === void 0 || hashes.length === 0) return [];
1227
- return getFaces(shape).filter((f) => hashes.includes(getHashCode(f)));
1228
- }
1229
- //#endregion
1230
- //#region src/topology/shapeRef/edgeRefFns.ts
1231
- function captureEdgeHint(edge) {
1232
- const lengthResult = measureLength(edge);
1233
- return {
1234
- entityType: "edge",
1235
- length: lengthResult.ok ? lengthResult.value : void 0,
1236
- midpoint: vertexCentroid(verticesOfEdge(edge))
1237
- };
1238
- }
1239
- function dedupeEdges(edges) {
1240
- const seen = /* @__PURE__ */ new Set();
1241
- const out = [];
1242
- for (const e of edges) {
1243
- const h = getHashCode(e);
1244
- if (!seen.has(h)) {
1245
- seen.add(h);
1246
- out.push(e);
1247
- }
1248
- }
1249
- return out;
1250
- }
1251
- /** Hint scores closer than this are treated as indistinguishable (→ ambiguous). */
1252
- var HINT_MARGIN$2 = 1e-6;
1253
- /**
1254
- * Pick the candidate edge closest to the hint (length + endpoint midpoint).
1255
- * Returns undefined when it genuinely can't discriminate — the hint carries no
1256
- * signal, or the two best candidates score within {@link HINT_MARGIN} — so the
1257
- * caller can report `ambiguous` rather than committing to an arbitrary edge.
1258
- */
1259
- function bestByHint(candidates, hint) {
1260
- if (hint.length === void 0 && hint.midpoint === void 0) return void 0;
1261
- let best;
1262
- let bestScore = Infinity;
1263
- let secondScore = Infinity;
1264
- for (const edge of candidates) {
1265
- let score = 0;
1266
- if (hint.length !== void 0) {
1267
- const len = measureLength(edge);
1268
- if (len.ok) score += Math.abs(len.value - hint.length);
1269
- }
1270
- if (hint.midpoint !== void 0) {
1271
- const mid = vertexCentroid(verticesOfEdge(edge));
1272
- if (mid !== void 0) score += distance(hint.midpoint, mid);
1273
- }
1274
- if (score < bestScore) {
1275
- secondScore = bestScore;
1276
- bestScore = score;
1277
- best = edge;
1278
- } else if (score < secondScore) secondScore = score;
1279
- }
1280
- if (best === void 0 || secondScore - bestScore < HINT_MARGIN$2) return void 0;
1281
- return best;
1282
- }
1283
- /**
1284
- * Capture a lineage-based reference to `edge`: its two adjacent faces' roles
1285
- * plus a geometric hint. Returns undefined when the edge doesn't bound two faces
1286
- * (a boundary/degenerate edge) or when either bounding face has no role yet.
1287
- */
1288
- function createEdgeRef(origin, edge, shape, roles) {
1289
- const [faceA, faceB] = facesOfEdge(shape, edge);
1290
- if (faceA === void 0 || faceB === void 0) return void 0;
1291
- const roleA = roleOfFace(faceA, origin, roles);
1292
- const roleB = roleOfFace(faceB, origin, roles);
1293
- if (roleA === void 0 || roleB === void 0) return void 0;
1294
- return {
1295
- origin,
1296
- faceRoles: [roleA, roleB],
1297
- hint: captureEdgeHint(edge)
1298
- };
1299
- }
1300
- /**
1301
- * Resolve an EdgeRef in `shape`: resolve its two face-roles to current faces,
1302
- * then return the edge they share. One shared edge → exact; several (the two
1303
- * faces meet along more than one edge) → disambiguate by hint; none, or a
1304
- * missing bounding face → broken.
1305
- */
1306
- function resolveEdgeRef(ref, roles, shape) {
1307
- const [roleA, roleB] = ref.faceRoles;
1308
- const facesA = facesForRole(shape, ref.origin, roleA, roles);
1309
- const facesB = facesForRole(shape, ref.origin, roleB, roles);
1310
- if (facesA.length === 0 || facesB.length === 0) return {
1311
- ref,
1312
- reason: "not-found"
1313
- };
1314
- const candidates = [];
1315
- for (const a of facesA) for (const b of facesB) candidates.push(...sharedEdges(a, b));
1316
- const unique = dedupeEdges(candidates);
1317
- if (unique.length === 1) {
1318
- const [only] = unique;
1319
- if (only !== void 0) return {
1320
- edge: only,
1321
- confidence: "exact"
1322
- };
1323
- }
1324
- if (unique.length > 1) {
1325
- const best = bestByHint(unique, ref.hint);
1326
- if (best !== void 0) return {
1327
- edge: best,
1328
- confidence: "geometric-fallback"
1329
- };
1330
- return {
1331
- ref,
1332
- reason: "ambiguous",
1333
- candidates: unique
1334
- };
1335
- }
1336
- return {
1337
- ref,
1338
- reason: "not-found"
1339
- };
1340
- }
1341
- //#endregion
1342
- //#region src/topology/shapeRef/vertexRefFns.ts
1343
- /** A corner needs at least this many faces to pin a unique point. */
1344
- var MIN_VERTEX_FACES = 3;
1345
- /** Hint distances closer than this are indistinguishable (→ ambiguous). */
1346
- var HINT_MARGIN$1 = 1e-6;
1347
- /** Hashes of all vertices across `faces`, recording one handle per hash. */
1348
- function vertexHashes(faces, handles) {
1349
- const hashes = /* @__PURE__ */ new Set();
1350
- for (const f of faces) for (const v of verticesOfFace(f)) {
1351
- const h = getHashCode(v);
1352
- hashes.add(h);
1353
- if (!handles.has(h)) handles.set(h, v);
1354
- }
1355
- return hashes;
1356
- }
1357
- function intersect$2(a, b) {
1358
- const out = /* @__PURE__ */ new Set();
1359
- for (const h of a) if (b.has(h)) out.add(h);
1360
- return out;
1361
- }
1362
- /** Vertices present in (a face of) every face-set — the shared corner(s). */
1363
- function commonVertices(faceSets) {
1364
- const handles = /* @__PURE__ */ new Map();
1365
- let common;
1366
- for (const faces of faceSets) {
1367
- const hashes = vertexHashes(faces, handles);
1368
- common = common === void 0 ? hashes : intersect$2(common, hashes);
1369
- }
1370
- if (common === void 0) return [];
1371
- const result = [];
1372
- for (const h of common) {
1373
- const v = handles.get(h);
1374
- if (v !== void 0) result.push(v);
1375
- }
1376
- return result;
1377
- }
1378
- /** Nearest candidate to the hint position; undefined if no signal or a tie. */
1379
- function nearestToHint(vertices, hint) {
1380
- if (hint.position === void 0) return void 0;
1381
- let best;
1382
- let bestDist = Infinity;
1383
- let secondDist = Infinity;
1384
- for (const v of vertices) {
1385
- const d = distance(vertexPosition(v), hint.position);
1386
- if (d < bestDist) {
1387
- secondDist = bestDist;
1388
- bestDist = d;
1389
- best = v;
1390
- } else if (d < secondDist) secondDist = d;
1391
- }
1392
- if (best === void 0 || secondDist - bestDist < HINT_MARGIN$1) return void 0;
1393
- return best;
1394
- }
1395
- /**
1396
- * Capture a lineage-based reference to `vertex`: the roles of the ≥3 faces
1397
- * meeting at it, plus a position hint. Returns undefined when fewer than three
1398
- * named faces meet there (a 2-face "vertex" is ambiguous — an edge has two).
1399
- */
1400
- function createVertexRef(origin, vertex, shape, roles) {
1401
- const faces = facesOfVertex(shape, vertex);
1402
- if (faces.length < MIN_VERTEX_FACES) return void 0;
1403
- const roleSet = /* @__PURE__ */ new Set();
1404
- for (const f of faces) {
1405
- const role = roleOfFace(f, origin, roles);
1406
- if (role !== void 0) roleSet.add(role);
1407
- }
1408
- if (roleSet.size < MIN_VERTEX_FACES) return void 0;
1409
- return {
1410
- origin,
1411
- faceRoles: [...roleSet].sort(),
1412
- hint: {
1413
- entityType: "vertex",
1414
- position: vertexPosition(vertex)
1415
- }
1416
- };
1417
- }
1418
- /**
1419
- * Resolve a VertexRef in `shape`: gather the current faces of each role, then
1420
- * return the vertex common to all of them. One common vertex → exact; several →
1421
- * disambiguate by hint position; none, or a missing role → broken.
1422
- */
1423
- function resolveVertexRef(ref, roles, shape) {
1424
- const faceSets = [];
1425
- for (const role of ref.faceRoles) {
1426
- const faces = facesForRole(shape, ref.origin, role, roles);
1427
- if (faces.length === 0) return {
1428
- ref,
1429
- reason: "not-found"
1430
- };
1431
- faceSets.push(faces);
1432
- }
1433
- const common = commonVertices(faceSets);
1434
- if (common.length === 1) {
1435
- const [only] = common;
1436
- if (only !== void 0) return {
1437
- vertex: only,
1438
- confidence: "exact"
1439
- };
1440
- }
1441
- if (common.length > 1) {
1442
- const best = nearestToHint(common, ref.hint);
1443
- if (best !== void 0) return {
1444
- vertex: best,
1445
- confidence: "geometric-fallback"
1446
- };
1447
- return {
1448
- ref,
1449
- reason: "ambiguous",
1450
- candidates: common
1451
- };
1452
- }
1453
- return {
1454
- ref,
1455
- reason: "not-found"
1456
- };
1457
- }
1458
- //#endregion
1459
- //#region src/topology/shapeRef/derivedFaceRefFns.ts
1460
- /** A face re-derives a bridged face when its normal is nearly identical. */
1461
- var NORMAL_MATCH = .99;
1462
- /** A generated face's normal has a positive component along BOTH bridged normals. */
1463
- var BLEND_THRESHOLD = .1;
1464
- /** Tiebreak distances closer than this are indistinguishable (→ ambiguous). */
1465
- var HINT_MARGIN = 1e-6;
1466
- function normalDot(a, b) {
1467
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
1468
- }
1469
- /** Faces whose outward normal nearly matches `normal` (re-derives a bridged face). */
1470
- function facesByNormal(shape, normal) {
1471
- return getFaces(shape).filter((f) => normalDot(normalAt(f), normal) > NORMAL_MATCH);
1472
- }
1473
- /**
1474
- * Faces adjacent to BOTH face sets, excluding the sets themselves. Uses the
1475
- * cached edge→faces adjacency (`adjacentFaces`) rather than an O(F·N) per-pair
1476
- * `sharedEdges` scan.
1477
- */
1478
- function betweenFaces(shape, aFaces, bFaces) {
1479
- const exclude = new Set([...aFaces, ...bFaces].map(getHashCode));
1480
- const adjacentToA = /* @__PURE__ */ new Set();
1481
- for (const a of aFaces) for (const f of adjacentFaces(shape, a)) adjacentToA.add(getHashCode(f));
1482
- const result = [];
1483
- const seen = /* @__PURE__ */ new Set();
1484
- for (const b of bFaces) for (const f of adjacentFaces(shape, b)) {
1485
- const h = getHashCode(f);
1486
- if (exclude.has(h) || seen.has(h) || !adjacentToA.has(h)) continue;
1487
- seen.add(h);
1488
- result.push(f);
1489
- }
1490
- return result;
1491
- }
1492
- /** Face whose center is nearest `point`; undefined on a tie (→ ambiguous). */
1493
- function nearestFace(faces, point) {
1494
- let best;
1495
- let bestDist = Infinity;
1496
- let secondDist = Infinity;
1497
- for (const f of faces) {
1498
- const d = distance(faceCenter(f), point);
1499
- if (d < bestDist) {
1500
- secondDist = bestDist;
1501
- bestDist = d;
1502
- best = f;
1503
- } else if (d < secondDist) secondDist = d;
1504
- }
1505
- if (best === void 0 || secondDist - bestDist < HINT_MARGIN) return void 0;
1506
- return best;
1507
- }
1508
- /**
1509
- * Capture a reference to the face an `op` (fillet/chamfer) will generate across
1510
- * `edge`: the roles of the edge's two faces, their outward normals, and the edge
1511
- * midpoint. Call this on the PRE-op shape. Returns undefined when the edge
1512
- * doesn't bound two named faces.
1513
- */
1514
- function createDerivedFaceRef(origin, op, edge, preShape, roles) {
1515
- const [faceA, faceB] = facesOfEdge(preShape, edge);
1516
- if (faceA === void 0 || faceB === void 0) return void 0;
1517
- const roleA = roleOfFace(faceA, origin, roles);
1518
- const roleB = roleOfFace(faceB, origin, roles);
1519
- if (roleA === void 0 || roleB === void 0) return void 0;
1520
- return {
1521
- origin,
1522
- op,
1523
- betweenRoles: [roleA, roleB],
1524
- hint: {
1525
- entityType: "derived-face",
1526
- normalA: normalAt(faceA),
1527
- normalB: normalAt(faceB),
1528
- edgeMidpoint: vertexCentroid(verticesOfEdge(edge))
1529
- }
1530
- };
1531
- }
1532
- /**
1533
- * Resolve a DerivedFaceRef in the post-op `shape`: re-derive the two bridged
1534
- * faces (role table, else by captured normal), then return the face adjacent to
1535
- * both whose normal blends both. One survivor → resolved; several →
1536
- * nearest-to-edge-midpoint; none → broken.
1537
- */
1538
- function resolveDerivedFaceRef(ref, roles, shape) {
1539
- let aFaces = facesForRole(shape, ref.origin, ref.betweenRoles[0], roles);
1540
- if (aFaces.length === 0) aFaces = facesByNormal(shape, ref.hint.normalA);
1541
- let bFaces = facesForRole(shape, ref.origin, ref.betweenRoles[1], roles);
1542
- if (bFaces.length === 0) bFaces = facesByNormal(shape, ref.hint.normalB);
1543
- if (aFaces.length === 0 || bFaces.length === 0) return {
1544
- ref,
1545
- reason: "not-found"
1546
- };
1547
- const blended = betweenFaces(shape, aFaces, bFaces).filter((f) => normalDot(normalAt(f), ref.hint.normalA) > BLEND_THRESHOLD && normalDot(normalAt(f), ref.hint.normalB) > BLEND_THRESHOLD);
1548
- if (blended.length === 1) {
1549
- const [only] = blended;
1550
- if (only !== void 0) return {
1551
- face: only,
1552
- confidence: "geometric-fallback"
1553
- };
1554
- }
1555
- if (blended.length > 1) {
1556
- const best = ref.hint.edgeMidpoint && nearestFace(blended, ref.hint.edgeMidpoint);
1557
- if (best) return {
1558
- face: best,
1559
- confidence: "geometric-fallback"
1560
- };
1561
- return {
1562
- ref,
1563
- reason: "ambiguous",
1564
- candidates: blended
1565
- };
1566
- }
1567
- return {
1568
- ref,
1569
- reason: "not-found"
1570
- };
1571
- }
1572
- //#endregion
1573
1190
  //#region src/topology/surfaceFns.ts
1574
1191
  /**
1575
1192
  * Surface creation functions — generate faces from height-map grids.
@@ -3898,7 +3515,7 @@ function cutAll(base, tools, options) {
3898
3515
  }
3899
3516
  /** Compute the intersection of two shapes (boolean common). */
3900
3517
  function intersect(a, b, options) {
3901
- return intersect$3(resolve(a), resolve(b), {
3518
+ return intersect$2(resolve(a), resolve(b), {
3902
3519
  ...options,
3903
3520
  unsafe: true
3904
3521
  });
@@ -6015,7 +5632,7 @@ function evalIntersect(node, ctx) {
6015
5632
  if (!a.ok) return a;
6016
5633
  const b = resolveOperand(ctx, node.b, "Intersect.b");
6017
5634
  if (!b.ok) return b;
6018
- return intersect$3(a.value, b.value, boolOptions(node, ctx));
5635
+ return intersect$2(a.value, b.value, boolOptions(node, ctx));
6019
5636
  }
6020
5637
  function resolveAll(ctx, nodes, where) {
6021
5638
  const out = [];
@@ -7170,4 +6787,4 @@ var csg_exports = /* @__PURE__ */ __exportAll({
7170
6787
  withEvaluator: () => withEvaluator
7171
6788
  });
7172
6789
  //#endregion
7173
- export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDerivedFaceRef, createDistanceQuery, createEdge, createEdgeRef, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createVertexRef, createWire, createWorkerClient, createWorkerHandler, createWorkerPool, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, cylindricalJoint, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, exportURDF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, facesOfVertex, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, gridPattern, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, importURDF, init, initFromManifold, initFromOC, initVoxel, innerWires, instance, instanceCount, instanceGrid, instancedMesh, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, inverseKinematics, ioNs_exports as io, ioError, is2D, is3D, isBatchRequest, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isInstanced, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTrajectory, jointTransform, jointsFromDH, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, materialize, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshLODs, meshLODsProgressive, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarJoint, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDerivedFaceRef, resolveDirection, resolveEdgeRef, resolvePlane, resolveRef, resolveVertexRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setJointValues, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere$1 as sphere, sphericalJoint, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, thread, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLODGeometryLevels, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, verticesOfFace, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
6790
+ export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDerivedFaceRef, createDistanceQuery, createEdge, createEdgeRef, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createVertexRef, createWire, createWorkerClient, createWorkerHandler, createWorkerPool, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, cylindricalJoint, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, exportURDF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, facesOfVertex, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, gridPattern, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, importURDF, init, initFromManifold, initFromOC, initVoxel, innerWires, instance, instanceCount, instanceGrid, instancedMesh, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, inverseKinematics, ioNs_exports as io, ioError, is2D, is3D, isBatchRequest, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDerivedFaceRef, isDisposeRequest, isEdge, isEdgeRef, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFaceRef, isFilletRadius, isInitRequest, isInside2D, isInstanced, isLineageRef, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isVertexRef, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTrajectory, jointTransform, jointsFromDH, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, materialize, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshLODs, meshLODsProgressive, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarJoint, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDerivedFaceRef, resolveDirection, resolveEdgeRef, resolveLineageRef, resolvePlane, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setJointValues, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere$1 as sphere, sphericalJoint, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, thread, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLODGeometryLevels, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, verticesOfFace, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };