brepjs 20.12.6 → 20.12.8
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/2d/blueprints/booleanHelpers.d.ts +0 -5
- package/dist/2d/blueprints/intersectionSegments.d.ts +6 -5
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-BFJfaUwX.cjs → adjacencyFns-BfgFo-Rh.cjs} +3 -3
- package/dist/{adjacencyFns--KmBIKYJ.js → adjacencyFns-Bl109A3Z.js} +3 -3
- package/dist/{blueprint-D83DDDPb.cjs → blueprint-DTDSztfd.cjs} +5 -5
- package/dist/{blueprint-BhIk9Pvm.js → blueprint-RqemOtg5.js} +5 -5
- package/dist/{blueprintFns-eULVgkq9.js → blueprintFns-B9_PhTr8.js} +2 -2
- package/dist/{blueprintFns-C4TQn-x_.cjs → blueprintFns-C7E5R89N.cjs} +2 -2
- package/dist/{blueprintSketcher-D_Faf0GO.js → blueprintSketcher-B15522Kr.js} +3 -3
- package/dist/{blueprintSketcher-Di376t-0.cjs → blueprintSketcher-Brj4lXjj.cjs} +3 -3
- package/dist/{boolean2D-CNZFI_y8.cjs → boolean2D-DZ8aJbI-.cjs} +42 -50
- package/dist/{boolean2D-DqpCF72W.js → boolean2D-_eiIiNw1.js} +42 -50
- package/dist/{solidBuilders-iS5DDwg8.cjs → booleanFns-D5nQ1nWS.cjs} +11 -217
- package/dist/{solidBuilders-DT1gpVWM.js → booleanFns-cNfXGqMX.js} +10 -156
- package/dist/brepjs.cjs +325 -168
- package/dist/brepjs.js +282 -125
- package/dist/{cameraFns-RqraCXIc.cjs → cameraFns-6Er2lhp5.cjs} +3 -3
- package/dist/{cameraFns-CrClIkmV.js → cameraFns-YhB7A_Zc.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-CdOe1Wrb.cjs → cornerFinder-D9Wx3DWu.cjs} +1 -1
- package/dist/{cornerFinder-BZuQkRp2.js → cornerFinder-G1WkSkVl.js} +1 -1
- package/dist/{curveFns-CyIvQNYT.cjs → curveFns-B5_N-gMj.cjs} +1 -1
- package/dist/{curveFns-BP3srCfK.js → curveFns-C4CqthJp.js} +1 -1
- package/dist/{drawFns-DxDwJ5zZ.js → drawFns-DU5fewKl.js} +12 -12
- package/dist/{drawFns-71cOhWD-.cjs → drawFns-UPbO2heB.cjs} +12 -12
- package/dist/{faceFns-iVPbTxki.js → faceFns-BgRNa5vx.js} +2 -2
- package/dist/{faceFns-B7MiDYj1.cjs → faceFns-C4NOGZBg.cjs} +2 -2
- package/dist/{healingFns-BhP8zfp1.js → healingFns-BzOo0yyz.js} +5 -5
- package/dist/{healingFns-DWljGTNR.cjs → healingFns-i5gV3BMG.cjs} +29 -29
- package/dist/{helpers-DKEVm6Hu.cjs → helpers-DJQeDf_5.cjs} +6 -6
- package/dist/{helpers-D2hANLRu.js → helpers-DPHQt2Kr.js} +6 -6
- package/dist/{importFns-KEPAgbjj.cjs → importFns-BiRpt227.cjs} +319 -14
- package/dist/{importFns-DUzIkns7.js → importFns-CwrJsNvg.js} +314 -15
- package/dist/io/igesSupport.d.ts +6 -0
- package/dist/io/importFns.d.ts +15 -5
- package/dist/io/ioUtils.d.ts +15 -3
- package/dist/io/meshNesting.d.ts +11 -0
- package/dist/io/threemfImportFns.d.ts +6 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -2
- package/dist/{loftFns-D5AvfCGG.cjs → loftFns-DgkK4Kj_.cjs} +1 -1
- package/dist/{loftFns-D5NJpHLZ.js → loftFns-lwzTh1fI.js} +1 -1
- package/dist/{measureFns-CZHNWkiA.cjs → measureFns-D_RRjCZg.cjs} +3 -3
- package/dist/{measureFns-mxBdPiWa.js → measureFns-Q3K25IfN.js} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-DmjMzNbH.js → meshFns-BGoJU6_P.js} +20 -6
- package/dist/{meshFns-Czlt-GBJ.cjs → meshFns-Djbb4PUC.cjs} +25 -5
- package/dist/{occtWasmAdapter-B9d0Q0Vl.js → occtWasmAdapter-BCCwaYkq.js} +103 -40
- package/dist/{occtWasmAdapter-DVxLkjlJ.cjs → occtWasmAdapter-UcYZRi-w.cjs} +103 -40
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-BVeBEaa4.cjs → primitiveFns-CfSnex9P.cjs} +19 -18
- package/dist/{primitiveFns-DeNl60Rw.js → primitiveFns-D-aYcwt2.js} +5 -4
- package/dist/{principalBoxFns-3mW_hA6z.js → principalBoxFns-Dcp9gg5e.js} +3 -3
- package/dist/{principalBoxFns-CG6kG7vT.cjs → principalBoxFns-IY8FfPVj.cjs} +3 -3
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-DHx1Y3GG.js → refResolveFns-BPge7T5w.js} +6 -6
- package/dist/{refResolveFns-BAs4p9z7.cjs → refResolveFns-gZQ1o5XK.cjs} +6 -6
- package/dist/{shapeFns-C0w8vvfb.cjs → shapeFns-Bs92VrZh.cjs} +2 -2
- package/dist/{shapeFns-CgqKICF_.js → shapeFns-TWdr4Dv4.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-DwvQUp9M.js → shapeTypes-CIH-8d_a.js} +1 -1
- package/dist/{shapeTypes-Dc7j-MYg.cjs → shapeTypes-DmThK_oa.cjs} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{originTrackingFns-CHymOLLm.cjs → solidBuilders-DGskMugU.cjs} +209 -2
- package/dist/{originTrackingFns-CBnyKLm7.js → solidBuilders-q_hwYsdo.js} +150 -3
- package/dist/{surfaceBuilders-CPLe0bbk.js → surfaceBuilders-DXo4N7wQ.js} +3 -3
- package/dist/{surfaceBuilders-BvwSgD3C.cjs → surfaceBuilders-DeSLKg73.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BU0Rhk54.js → textBlueprints-BYWZho_c.js} +8 -7
- package/dist/{textBlueprints-CNPCPJix.cjs → textBlueprints-Dz6wNgve.cjs} +9 -8
- package/dist/{textMetrics-C71g4TmO.cjs → textMetrics-bKoFTj3m.cjs} +1 -1
- package/dist/{textMetrics-Df9aLYK2.js → textMetrics-k_rGqib2.js} +1 -1
- package/dist/{threadFns-DESH7lcs.js → threadFns-BeB8s0tA.js} +7 -7
- package/dist/{threadFns-CzXEnnmo.cjs → threadFns-CoGAFHHt.cjs} +9 -9
- package/dist/topology/meshFns.d.ts +3 -0
- package/dist/topology.cjs +11 -11
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-5Frx8Y-0.cjs → topologyQueryFns-CXbCFaU2.cjs} +1 -1
- package/dist/{topologyQueryFns-LXV1nTaS.js → topologyQueryFns-Cp0yekBh.js} +1 -1
- package/dist/{validityTypes-DM-Iwe8N.js → validityTypes-DlrWkrSR.js} +1 -1
- package/dist/{validityTypes-C6rROGTP.cjs → validityTypes-m6eLRTYE.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-UcYZRi-w.cjs");
|
|
2
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-DGskMugU.cjs");
|
|
5
6
|
// src/topology/meshCache.ts
|
|
6
7
|
/**
|
|
7
8
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -107,6 +108,16 @@ function createMeshCache() {
|
|
|
107
108
|
}
|
|
108
109
|
};
|
|
109
110
|
}
|
|
111
|
+
// src/io/igesSupport.ts
|
|
112
|
+
/**
|
|
113
|
+
* The capability error for an IGES call on a kernel built without an IGES
|
|
114
|
+
* translator (occt-wasm), or `null` when `cause` is any other failure.
|
|
115
|
+
*/
|
|
116
|
+
function igesUnsupportedError(operation, cause) {
|
|
117
|
+
if (!require_occtWasmAdapter.isUnsupportedKernelOperationError(cause)) return null;
|
|
118
|
+
const kernel = require_shapeTypes.getKernel().kernelId;
|
|
119
|
+
return require_errors.unsupportedError(require_errors.BrepErrorCode.UNSUPPORTED_CAPABILITY, `${operation}: the ${kernel} kernel has no IGES support`, cause, { kernel }, "Exchange the model as STEP (importSTEP / exportSTEP) instead");
|
|
120
|
+
}
|
|
110
121
|
// src/topology/meshFns.ts
|
|
111
122
|
/**
|
|
112
123
|
* Meshing and export functions — functional replacements for Shape mesh/export methods.
|
|
@@ -150,7 +161,7 @@ function mesh(shape, opts = {}) {
|
|
|
150
161
|
includeUVs,
|
|
151
162
|
...signal ? { signal } : {}
|
|
152
163
|
});
|
|
153
|
-
const origins =
|
|
164
|
+
const origins = require_solidBuilders.getFaceOrigins(shape);
|
|
154
165
|
const mesh = {
|
|
155
166
|
vertices: result.vertices,
|
|
156
167
|
normals: result.normals,
|
|
@@ -297,13 +308,16 @@ function exportSTL(shape, opts = {}) {
|
|
|
297
308
|
* Export a shape as an IGES file Blob.
|
|
298
309
|
*
|
|
299
310
|
* @returns Ok with a Blob (MIME type `application/iges`), or Err on failure.
|
|
311
|
+
*
|
|
312
|
+
* @remarks The default occt-wasm kernel is built without an IGES translator, so
|
|
313
|
+
* there this returns an `UNSUPPORTED_CAPABILITY` error; export STEP instead.
|
|
300
314
|
*/
|
|
301
315
|
function exportIGES(shape) {
|
|
302
316
|
try {
|
|
303
317
|
const igesString = require_shapeTypes.getKernel().exportIGES([shape.wrapped]);
|
|
304
318
|
return require_errors.ok(new Blob([igesString], { type: "application/iges" }));
|
|
305
319
|
} catch (e) {
|
|
306
|
-
return require_errors.err(require_errors.ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
320
|
+
return require_errors.err(igesUnsupportedError("exportIGES", e) ?? require_errors.ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
307
321
|
}
|
|
308
322
|
}
|
|
309
323
|
/**
|
|
@@ -472,6 +486,12 @@ Object.defineProperty(exports, "exportSTL", {
|
|
|
472
486
|
return exportSTL;
|
|
473
487
|
}
|
|
474
488
|
});
|
|
489
|
+
Object.defineProperty(exports, "igesUnsupportedError", {
|
|
490
|
+
enumerable: true,
|
|
491
|
+
get: function() {
|
|
492
|
+
return igesUnsupportedError;
|
|
493
|
+
}
|
|
494
|
+
});
|
|
475
495
|
Object.defineProperty(exports, "mesh", {
|
|
476
496
|
enumerable: true,
|
|
477
497
|
get: function() {
|
|
@@ -1541,10 +1541,7 @@ function intersectCurves2dFn(c1, c2, tolerance) {
|
|
|
1541
1541
|
points: intersectLineCircle(c2, b2, c1, b1, tolerance),
|
|
1542
1542
|
segments: []
|
|
1543
1543
|
};
|
|
1544
|
-
if (b1.__bk2d === "circle" && b2.__bk2d === "circle") return
|
|
1545
|
-
points: intersectCircleCircle(c1, b1, c2, b2, tolerance),
|
|
1546
|
-
segments: []
|
|
1547
|
-
};
|
|
1544
|
+
if (b1.__bk2d === "circle" && b2.__bk2d === "circle") return intersectCircleCircle(c1, b1, c2, b2, tolerance);
|
|
1548
1545
|
return numericalIntersect(c1, c2, tolerance, c1 === c2);
|
|
1549
1546
|
}
|
|
1550
1547
|
/** Unwrap trimmed wrappers to get the basis curve type. */
|
|
@@ -1553,9 +1550,32 @@ function unwrapCurve(c) {
|
|
|
1553
1550
|
while (cur.__bk2d === "trimmed") cur = cur.basis;
|
|
1554
1551
|
return cur;
|
|
1555
1552
|
}
|
|
1556
|
-
/**
|
|
1553
|
+
/**
|
|
1554
|
+
* The interval a curve covers on its innermost basis's parameter. A trimmed wrapper's own
|
|
1555
|
+
* parameter runs 0..1, but the analytic solvers work on the unwrapped basis, so their
|
|
1556
|
+
* parameters must be bounded by this interval rather than by `curveBounds(c)`.
|
|
1557
|
+
*/
|
|
1558
|
+
function basisInterval(c) {
|
|
1559
|
+
if (c.__bk2d !== "trimmed") return curveBounds(c);
|
|
1560
|
+
const a = basisParam(c.basis, c.tStart);
|
|
1561
|
+
const b = basisParam(c.basis, c.tEnd);
|
|
1562
|
+
return {
|
|
1563
|
+
first: Math.min(a, b),
|
|
1564
|
+
last: Math.max(a, b)
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
function basisParam(c, t) {
|
|
1568
|
+
let cur = c;
|
|
1569
|
+
let s = t;
|
|
1570
|
+
while (cur.__bk2d === "trimmed") {
|
|
1571
|
+
s = cur.tStart + s * (cur.tEnd - cur.tStart);
|
|
1572
|
+
cur = cur.basis;
|
|
1573
|
+
}
|
|
1574
|
+
return s;
|
|
1575
|
+
}
|
|
1576
|
+
/** Check if basis parameter t lies within the part of the basis that c covers. */
|
|
1557
1577
|
function inDomain(c, t, tol) {
|
|
1558
|
-
const b =
|
|
1578
|
+
const b = basisInterval(c);
|
|
1559
1579
|
return t >= b.first - tol && t <= b.last + tol;
|
|
1560
1580
|
}
|
|
1561
1581
|
/** Find the parameter on curve c closest to point (px, py), searching near tGuess. */
|
|
@@ -1631,7 +1651,7 @@ function intersectLineLine(c1, l1, c2, l2, tol) {
|
|
|
1631
1651
|
points: [],
|
|
1632
1652
|
segments: []
|
|
1633
1653
|
};
|
|
1634
|
-
const b1 =
|
|
1654
|
+
const b1 = basisInterval(c1);
|
|
1635
1655
|
const b2 = curveBounds(c2);
|
|
1636
1656
|
const p2s = evaluateCurve2d$1(c2, b2.first);
|
|
1637
1657
|
const p2e = evaluateCurve2d$1(c2, b2.last);
|
|
@@ -1672,42 +1692,83 @@ function intersectLineCircle(cLine, line, cCirc, circ, tol) {
|
|
|
1672
1692
|
}
|
|
1673
1693
|
return results;
|
|
1674
1694
|
}
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1695
|
+
/**
|
|
1696
|
+
* The counter-clockwise angular range [start, start + sweep] a circular curve covers,
|
|
1697
|
+
* and whether the curve itself runs counter-clockwise through it.
|
|
1698
|
+
*/
|
|
1699
|
+
function arcSpan(c, circ) {
|
|
1700
|
+
const range = basisInterval(c);
|
|
1701
|
+
const own = curveBounds(c);
|
|
1702
|
+
const forward = basisParam(c, own.last) >= basisParam(c, own.first);
|
|
1703
|
+
return {
|
|
1704
|
+
start: circ.sense ? range.first : -range.last,
|
|
1705
|
+
sweep: Math.min(range.last - range.first, 2 * Math.PI),
|
|
1706
|
+
ccw: circ.sense === forward
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
/** The arc of `circ` from angle `from` counter-clockwise to `to`, traversed as `ccw` says. */
|
|
1710
|
+
function arcBetween(circ, from, to, ccw) {
|
|
1711
|
+
const basis = makeCircle2d$1(circ.cx, circ.cy, circ.radius, ccw);
|
|
1712
|
+
return ccw ? {
|
|
1713
|
+
__bk2d: "trimmed",
|
|
1714
|
+
basis,
|
|
1715
|
+
tStart: from,
|
|
1716
|
+
tEnd: to
|
|
1717
|
+
} : {
|
|
1718
|
+
__bk2d: "trimmed",
|
|
1719
|
+
basis,
|
|
1720
|
+
tStart: -to,
|
|
1721
|
+
tEnd: -from
|
|
1722
|
+
};
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Overlap of two arcs on the same circle: the shared stretches as segments oriented
|
|
1726
|
+
* along c1, and the places where the arcs only touch end to end as points.
|
|
1727
|
+
*/
|
|
1728
|
+
function intersectCoincidentArcs(c1, circ1, c2, circ2, tol) {
|
|
1729
|
+
const turn = 2 * Math.PI;
|
|
1730
|
+
const a = arcSpan(c1, circ1);
|
|
1731
|
+
const b = arcSpan(c2, circ2);
|
|
1732
|
+
const angleTol = tol / circ1.radius;
|
|
1733
|
+
const isFull = (sweep) => turn - sweep <= angleTol;
|
|
1734
|
+
const d = ((b.start - a.start) % turn + turn) % turn;
|
|
1735
|
+
let windows;
|
|
1736
|
+
if (isFull(b.sweep)) windows = [[0, a.sweep]];
|
|
1737
|
+
else if (isFull(a.sweep)) windows = [[d, d + b.sweep]];
|
|
1738
|
+
else windows = [[Math.max(0, d), Math.min(a.sweep, d + b.sweep)], [Math.max(0, d - turn), Math.min(a.sweep, d - turn + b.sweep)]];
|
|
1739
|
+
const points = [];
|
|
1740
|
+
const segments = [];
|
|
1741
|
+
for (const [u, v] of windows) if (v - u > angleTol) segments.push(arcBetween(circ1, a.start + u, a.start + v, a.ccw));
|
|
1742
|
+
else if (v - u > -angleTol) {
|
|
1743
|
+
const angle = a.start + (u + v) / 2;
|
|
1744
|
+
points.push([circ1.cx + circ1.radius * Math.cos(angle), circ1.cy + circ1.radius * Math.sin(angle)]);
|
|
1696
1745
|
}
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1746
|
+
return {
|
|
1747
|
+
points,
|
|
1748
|
+
segments
|
|
1749
|
+
};
|
|
1700
1750
|
}
|
|
1701
1751
|
function intersectCircleCircle(c1, circ1, c2, circ2, tol) {
|
|
1702
1752
|
const dx = circ2.cx - circ1.cx;
|
|
1703
1753
|
const dy = circ2.cy - circ1.cy;
|
|
1704
1754
|
const d = Math.sqrt(dx * dx + dy * dy);
|
|
1755
|
+
if (d <= tol) {
|
|
1756
|
+
if (Math.abs(circ1.radius - circ2.radius) > tol) return {
|
|
1757
|
+
points: [],
|
|
1758
|
+
segments: []
|
|
1759
|
+
};
|
|
1760
|
+
return intersectCoincidentArcs(c1, circ1, c2, circ2, tol);
|
|
1761
|
+
}
|
|
1762
|
+
return {
|
|
1763
|
+
points: intersectCrossingCircles(c1, circ1, c2, circ2, tol, d),
|
|
1764
|
+
segments: []
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
function intersectCrossingCircles(c1, circ1, c2, circ2, tol, d) {
|
|
1768
|
+
const dx = circ2.cx - circ1.cx;
|
|
1769
|
+
const dy = circ2.cy - circ1.cy;
|
|
1705
1770
|
if (d > circ1.radius + circ2.radius + tol) return [];
|
|
1706
1771
|
if (d < Math.abs(circ1.radius - circ2.radius) - tol) return [];
|
|
1707
|
-
if (d < 1e-14) {
|
|
1708
|
-
if (Math.abs(circ1.radius - circ2.radius) > tol) return [];
|
|
1709
|
-
return intersectConcentricArcs(c1, c2, tol);
|
|
1710
|
-
}
|
|
1711
1772
|
const a = (circ1.radius * circ1.radius - circ2.radius * circ2.radius + d * d) / (2 * d);
|
|
1712
1773
|
const h2 = circ1.radius * circ1.radius - a * a;
|
|
1713
1774
|
const h = Math.sqrt(Math.max(0, h2));
|
|
@@ -4447,13 +4508,15 @@ function importSTL(k, Module, data) {
|
|
|
4447
4508
|
return wrapResult(k, k.importStl(""));
|
|
4448
4509
|
}
|
|
4449
4510
|
function exportIGES(k, makeCompound, shapes) {
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
return
|
|
4511
|
+
const exportIges = k.exportIges?.bind(k);
|
|
4512
|
+
if (!exportIges) throw new UnsupportedKernelOperationError("occt-wasm: exportIGES is unsupported");
|
|
4513
|
+
if (shapes.length === 1) return exportIges(unwrap(shapes[0]));
|
|
4514
|
+
return exportIges(unwrap(makeCompound(shapes)));
|
|
4453
4515
|
}
|
|
4454
4516
|
function importIGES(k, data) {
|
|
4455
|
-
const
|
|
4456
|
-
|
|
4517
|
+
const importIges = k.importIges?.bind(k);
|
|
4518
|
+
if (!importIges) throw new UnsupportedKernelOperationError("occt-wasm: importIGES is unsupported");
|
|
4519
|
+
return [wrapResult(k, importIges(typeof data === "string" ? data : new TextDecoder().decode(data)))];
|
|
4457
4520
|
}
|
|
4458
4521
|
function exportSTEPAssembly(k, Module, parts, _options) {
|
|
4459
4522
|
if (parts.length === 0) return "";
|
|
@@ -1541,10 +1541,7 @@ function intersectCurves2dFn(c1, c2, tolerance) {
|
|
|
1541
1541
|
points: intersectLineCircle(c2, b2, c1, b1, tolerance),
|
|
1542
1542
|
segments: []
|
|
1543
1543
|
};
|
|
1544
|
-
if (b1.__bk2d === "circle" && b2.__bk2d === "circle") return
|
|
1545
|
-
points: intersectCircleCircle(c1, b1, c2, b2, tolerance),
|
|
1546
|
-
segments: []
|
|
1547
|
-
};
|
|
1544
|
+
if (b1.__bk2d === "circle" && b2.__bk2d === "circle") return intersectCircleCircle(c1, b1, c2, b2, tolerance);
|
|
1548
1545
|
return numericalIntersect(c1, c2, tolerance, c1 === c2);
|
|
1549
1546
|
}
|
|
1550
1547
|
/** Unwrap trimmed wrappers to get the basis curve type. */
|
|
@@ -1553,9 +1550,32 @@ function unwrapCurve(c) {
|
|
|
1553
1550
|
while (cur.__bk2d === "trimmed") cur = cur.basis;
|
|
1554
1551
|
return cur;
|
|
1555
1552
|
}
|
|
1556
|
-
/**
|
|
1553
|
+
/**
|
|
1554
|
+
* The interval a curve covers on its innermost basis's parameter. A trimmed wrapper's own
|
|
1555
|
+
* parameter runs 0..1, but the analytic solvers work on the unwrapped basis, so their
|
|
1556
|
+
* parameters must be bounded by this interval rather than by `curveBounds(c)`.
|
|
1557
|
+
*/
|
|
1558
|
+
function basisInterval(c) {
|
|
1559
|
+
if (c.__bk2d !== "trimmed") return curveBounds(c);
|
|
1560
|
+
const a = basisParam(c.basis, c.tStart);
|
|
1561
|
+
const b = basisParam(c.basis, c.tEnd);
|
|
1562
|
+
return {
|
|
1563
|
+
first: Math.min(a, b),
|
|
1564
|
+
last: Math.max(a, b)
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
function basisParam(c, t) {
|
|
1568
|
+
let cur = c;
|
|
1569
|
+
let s = t;
|
|
1570
|
+
while (cur.__bk2d === "trimmed") {
|
|
1571
|
+
s = cur.tStart + s * (cur.tEnd - cur.tStart);
|
|
1572
|
+
cur = cur.basis;
|
|
1573
|
+
}
|
|
1574
|
+
return s;
|
|
1575
|
+
}
|
|
1576
|
+
/** Check if basis parameter t lies within the part of the basis that c covers. */
|
|
1557
1577
|
function inDomain(c, t, tol) {
|
|
1558
|
-
const b =
|
|
1578
|
+
const b = basisInterval(c);
|
|
1559
1579
|
return t >= b.first - tol && t <= b.last + tol;
|
|
1560
1580
|
}
|
|
1561
1581
|
/** Find the parameter on curve c closest to point (px, py), searching near tGuess. */
|
|
@@ -1631,7 +1651,7 @@ function intersectLineLine(c1, l1, c2, l2, tol) {
|
|
|
1631
1651
|
points: [],
|
|
1632
1652
|
segments: []
|
|
1633
1653
|
};
|
|
1634
|
-
const b1 =
|
|
1654
|
+
const b1 = basisInterval(c1);
|
|
1635
1655
|
const b2 = curveBounds(c2);
|
|
1636
1656
|
const p2s = evaluateCurve2d$1(c2, b2.first);
|
|
1637
1657
|
const p2e = evaluateCurve2d$1(c2, b2.last);
|
|
@@ -1672,42 +1692,83 @@ function intersectLineCircle(cLine, line, cCirc, circ, tol) {
|
|
|
1672
1692
|
}
|
|
1673
1693
|
return results;
|
|
1674
1694
|
}
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1695
|
+
/**
|
|
1696
|
+
* The counter-clockwise angular range [start, start + sweep] a circular curve covers,
|
|
1697
|
+
* and whether the curve itself runs counter-clockwise through it.
|
|
1698
|
+
*/
|
|
1699
|
+
function arcSpan(c, circ) {
|
|
1700
|
+
const range = basisInterval(c);
|
|
1701
|
+
const own = curveBounds(c);
|
|
1702
|
+
const forward = basisParam(c, own.last) >= basisParam(c, own.first);
|
|
1703
|
+
return {
|
|
1704
|
+
start: circ.sense ? range.first : -range.last,
|
|
1705
|
+
sweep: Math.min(range.last - range.first, 2 * Math.PI),
|
|
1706
|
+
ccw: circ.sense === forward
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
/** The arc of `circ` from angle `from` counter-clockwise to `to`, traversed as `ccw` says. */
|
|
1710
|
+
function arcBetween(circ, from, to, ccw) {
|
|
1711
|
+
const basis = makeCircle2d$1(circ.cx, circ.cy, circ.radius, ccw);
|
|
1712
|
+
return ccw ? {
|
|
1713
|
+
__bk2d: "trimmed",
|
|
1714
|
+
basis,
|
|
1715
|
+
tStart: from,
|
|
1716
|
+
tEnd: to
|
|
1717
|
+
} : {
|
|
1718
|
+
__bk2d: "trimmed",
|
|
1719
|
+
basis,
|
|
1720
|
+
tStart: -to,
|
|
1721
|
+
tEnd: -from
|
|
1722
|
+
};
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Overlap of two arcs on the same circle: the shared stretches as segments oriented
|
|
1726
|
+
* along c1, and the places where the arcs only touch end to end as points.
|
|
1727
|
+
*/
|
|
1728
|
+
function intersectCoincidentArcs(c1, circ1, c2, circ2, tol) {
|
|
1729
|
+
const turn = 2 * Math.PI;
|
|
1730
|
+
const a = arcSpan(c1, circ1);
|
|
1731
|
+
const b = arcSpan(c2, circ2);
|
|
1732
|
+
const angleTol = tol / circ1.radius;
|
|
1733
|
+
const isFull = (sweep) => turn - sweep <= angleTol;
|
|
1734
|
+
const d = ((b.start - a.start) % turn + turn) % turn;
|
|
1735
|
+
let windows;
|
|
1736
|
+
if (isFull(b.sweep)) windows = [[0, a.sweep]];
|
|
1737
|
+
else if (isFull(a.sweep)) windows = [[d, d + b.sweep]];
|
|
1738
|
+
else windows = [[Math.max(0, d), Math.min(a.sweep, d + b.sweep)], [Math.max(0, d - turn), Math.min(a.sweep, d - turn + b.sweep)]];
|
|
1739
|
+
const points = [];
|
|
1740
|
+
const segments = [];
|
|
1741
|
+
for (const [u, v] of windows) if (v - u > angleTol) segments.push(arcBetween(circ1, a.start + u, a.start + v, a.ccw));
|
|
1742
|
+
else if (v - u > -angleTol) {
|
|
1743
|
+
const angle = a.start + (u + v) / 2;
|
|
1744
|
+
points.push([circ1.cx + circ1.radius * Math.cos(angle), circ1.cy + circ1.radius * Math.sin(angle)]);
|
|
1696
1745
|
}
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1746
|
+
return {
|
|
1747
|
+
points,
|
|
1748
|
+
segments
|
|
1749
|
+
};
|
|
1700
1750
|
}
|
|
1701
1751
|
function intersectCircleCircle(c1, circ1, c2, circ2, tol) {
|
|
1702
1752
|
const dx = circ2.cx - circ1.cx;
|
|
1703
1753
|
const dy = circ2.cy - circ1.cy;
|
|
1704
1754
|
const d = Math.sqrt(dx * dx + dy * dy);
|
|
1755
|
+
if (d <= tol) {
|
|
1756
|
+
if (Math.abs(circ1.radius - circ2.radius) > tol) return {
|
|
1757
|
+
points: [],
|
|
1758
|
+
segments: []
|
|
1759
|
+
};
|
|
1760
|
+
return intersectCoincidentArcs(c1, circ1, c2, circ2, tol);
|
|
1761
|
+
}
|
|
1762
|
+
return {
|
|
1763
|
+
points: intersectCrossingCircles(c1, circ1, c2, circ2, tol, d),
|
|
1764
|
+
segments: []
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
function intersectCrossingCircles(c1, circ1, c2, circ2, tol, d) {
|
|
1768
|
+
const dx = circ2.cx - circ1.cx;
|
|
1769
|
+
const dy = circ2.cy - circ1.cy;
|
|
1705
1770
|
if (d > circ1.radius + circ2.radius + tol) return [];
|
|
1706
1771
|
if (d < Math.abs(circ1.radius - circ2.radius) - tol) return [];
|
|
1707
|
-
if (d < 1e-14) {
|
|
1708
|
-
if (Math.abs(circ1.radius - circ2.radius) > tol) return [];
|
|
1709
|
-
return intersectConcentricArcs(c1, c2, tol);
|
|
1710
|
-
}
|
|
1711
1772
|
const a = (circ1.radius * circ1.radius - circ2.radius * circ2.radius + d * d) / (2 * d);
|
|
1712
1773
|
const h2 = circ1.radius * circ1.radius - a * a;
|
|
1713
1774
|
const h = Math.sqrt(Math.max(0, h2));
|
|
@@ -4447,13 +4508,15 @@ function importSTL(k, Module, data) {
|
|
|
4447
4508
|
return wrapResult(k, k.importStl(""));
|
|
4448
4509
|
}
|
|
4449
4510
|
function exportIGES(k, makeCompound, shapes) {
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
return
|
|
4511
|
+
const exportIges = k.exportIges?.bind(k);
|
|
4512
|
+
if (!exportIges) throw new UnsupportedKernelOperationError("occt-wasm: exportIGES is unsupported");
|
|
4513
|
+
if (shapes.length === 1) return exportIges(unwrap(shapes[0]));
|
|
4514
|
+
return exportIges(unwrap(makeCompound(shapes)));
|
|
4453
4515
|
}
|
|
4454
4516
|
function importIGES(k, data) {
|
|
4455
|
-
const
|
|
4456
|
-
|
|
4517
|
+
const importIges = k.importIges?.bind(k);
|
|
4518
|
+
if (!importIges) throw new UnsupportedKernelOperationError("occt-wasm: importIGES is unsupported");
|
|
4519
|
+
return [wrapResult(k, importIges(typeof data === "string" ? data : new TextDecoder().decode(data)))];
|
|
4457
4520
|
}
|
|
4458
4521
|
function exportSTEPAssembly(k, Module, parts, _options) {
|
|
4459
4522
|
if (parts.length === 0) return "";
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-CoGAFHHt.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-DgkK4Kj_.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-BeB8s0tA.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-lwzTh1fI.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-m6eLRTYE.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-DGskMugU.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-D5nQ1nWS.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DeSLKg73.cjs");
|
|
8
9
|
// src/topology/transformFns.ts
|
|
9
10
|
/**
|
|
10
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -12,10 +13,10 @@ const require_surfaceBuilders = require("./surfaceBuilders-BvwSgD3C.cjs");
|
|
|
12
13
|
*/
|
|
13
14
|
/** Translate a shape by a vector. Returns a new shape. */
|
|
14
15
|
function translate(shape, v) {
|
|
15
|
-
const inputFaceHashes =
|
|
16
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
16
17
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().translateWithHistory(shape.wrapped, v[0], v[1], v[2], inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
17
18
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
18
|
-
|
|
19
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
19
20
|
return result;
|
|
20
21
|
}
|
|
21
22
|
/** Rotate a shape around an axis. Angle is in degrees. Returns a new shape. */
|
|
@@ -28,10 +29,10 @@ function rotate(shape, angle, position = [
|
|
|
28
29
|
0,
|
|
29
30
|
1
|
|
30
31
|
]) {
|
|
31
|
-
const inputFaceHashes =
|
|
32
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
32
33
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().rotateWithHistory(shape.wrapped, angle * require_constants.DEG2RAD, inputFaceHashes, require_constants.HASH_CODE_MAX, direction, position);
|
|
33
34
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
34
|
-
|
|
35
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
35
36
|
return result;
|
|
36
37
|
}
|
|
37
38
|
/** Mirror a shape through a plane defined by origin and normal. Returns a new shape. */
|
|
@@ -44,10 +45,10 @@ function mirror(shape, planeNormal = [
|
|
|
44
45
|
0,
|
|
45
46
|
0
|
|
46
47
|
]) {
|
|
47
|
-
const inputFaceHashes =
|
|
48
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
48
49
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().mirrorWithHistory(shape.wrapped, planeOrigin, planeNormal, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
49
50
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
50
|
-
|
|
51
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
51
52
|
return result;
|
|
52
53
|
}
|
|
53
54
|
/** Scale a shape uniformly. Returns a new shape. */
|
|
@@ -56,10 +57,10 @@ function scale(shape, factor, center = [
|
|
|
56
57
|
0,
|
|
57
58
|
0
|
|
58
59
|
]) {
|
|
59
|
-
const inputFaceHashes =
|
|
60
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
60
61
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().scaleWithHistory(shape.wrapped, center, factor, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
61
62
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
62
|
-
|
|
63
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
63
64
|
return result;
|
|
64
65
|
}
|
|
65
66
|
/** Resize a shape to exact target dimensions with optional auto-proportional scaling. */
|
|
@@ -167,16 +168,16 @@ function applyMatrix(shape, matrix) {
|
|
|
167
168
|
const d = det3x3(linear);
|
|
168
169
|
if (Math.abs(d) < 1e-12) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.VALIDATION_FAILED, "applyMatrix: singular matrix (determinant ≈ 0). Cannot apply a non-invertible transform."));
|
|
169
170
|
if (isOrthogonalMatrix(linear)) {
|
|
170
|
-
const inputFaceHashes =
|
|
171
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
171
172
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().generalTransformWithHistory(shape.wrapped, linear, translation, true, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
172
173
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
173
|
-
|
|
174
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
174
175
|
return require_errors.ok(result);
|
|
175
176
|
}
|
|
176
177
|
/* v8 ignore start -- untestable until WASM is rebuilt with BRepBuilderAPI_GTransform */
|
|
177
178
|
const resultShape = require_shapeTypes.getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation);
|
|
178
179
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
179
|
-
|
|
180
|
+
require_booleanFns.propagateMetadataByHash([shape], result);
|
|
180
181
|
return require_errors.ok(result);
|
|
181
182
|
/* v8 ignore stop */
|
|
182
183
|
}
|
|
@@ -244,7 +245,7 @@ function locate(shape, placement) {
|
|
|
244
245
|
} finally {
|
|
245
246
|
_usingCtx$2.d();
|
|
246
247
|
}
|
|
247
|
-
if (
|
|
248
|
+
if (require_booleanFns.hasAnyMetadata(shape)) require_booleanFns.propagateMetadataThroughRelocation(shape, moved);
|
|
248
249
|
return moved;
|
|
249
250
|
} catch (cause) {
|
|
250
251
|
if (moved !== void 0) try {
|
|
@@ -264,10 +265,10 @@ function locate(shape, placement) {
|
|
|
264
265
|
* Much faster than separate clone() + translate() + rotate() calls.
|
|
265
266
|
*/
|
|
266
267
|
function transformCopy(shape, composed) {
|
|
267
|
-
const inputFaceHashes =
|
|
268
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
268
269
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().applyComposedTransformWithHistory(shape.wrapped, composed.trsf, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
269
270
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
270
|
-
|
|
271
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
271
272
|
return result;
|
|
272
273
|
}
|
|
273
274
|
// src/topology/primitiveFns.ts
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-DlrWkrSR.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-q_hwYsdo.js";
|
|
7
|
+
import { d as collectInputFaceHashes, f as hasAnyMetadata, h as propagateMetadataThroughRelocation, m as propagateMetadataByHash, p as propagateAllMetadata } from "./booleanFns-cNfXGqMX.js";
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-DXo4N7wQ.js";
|
|
8
9
|
// src/topology/transformFns.ts
|
|
9
10
|
/**
|
|
10
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-
|
|
4
|
+
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-Cp0yekBh.js";
|
|
5
5
|
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-
|
|
6
|
+
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-Q3K25IfN.js";
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-D_RRjCZg.cjs");
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-6Er2lhp5.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-
|
|
1
|
+
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-YhB7A_Zc.js";
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-DJQeDf_5.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-D9Wx3DWu.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|