brepjs 20.5.0 → 20.7.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/README.md +1 -0
- package/dist/2d.cjs +9 -11
- package/dist/2d.js +9 -11
- package/dist/{adjacencyFns-DeyXahej.js → adjacencyFns-BgJQQjdt.js} +5 -6
- package/dist/{adjacencyFns-1rxgJ6Hw.cjs → adjacencyFns-_RTYhwtD.cjs} +5 -6
- package/dist/{arrayAccess-DrUGPADn.js → arrayAccess-BpgouNir.js} +1 -2
- package/dist/{arrayAccess-e4H9cBfh.cjs → arrayAccess-DpJYARwv.cjs} +1 -2
- package/dist/{blueprint-rwJjYPzo.js → blueprint-Bth4EVaO.js} +24 -37
- package/dist/{blueprint-Yyoiz-U1.cjs → blueprint-wq2TU1XP.cjs} +24 -37
- package/dist/{blueprintFns-Q3Sq-Fse.js → blueprintFns-DQmNe1p6.js} +5 -7
- package/dist/{blueprintFns-Ce6OoPSX.cjs → blueprintFns-Dd0gm1rX.cjs} +5 -7
- package/dist/{blueprintSketcher-CzKbxeTk.cjs → blueprintSketcher-CSDqr27-.cjs} +19 -31
- package/dist/{blueprintSketcher-FywUpRiV.js → blueprintSketcher-DNp87aQZ.js} +19 -31
- package/dist/{boolean2D-D8igCYc9.js → boolean2D-BAb4SnIL.js} +13 -19
- package/dist/{boolean2D-BzZ9iBSn.cjs → boolean2D-BkgOjMRt.cjs} +13 -19
- package/dist/brepjs.cjs +113 -187
- package/dist/brepjs.js +113 -188
- package/dist/{bug-O02CsAmt.cjs → bug-CBcpIPuf.cjs} +2 -4
- package/dist/{bug-BdOHwn_e.js → bug-ClMTAJhe.js} +2 -4
- package/dist/{cameraFns-Cs6v3bWQ.js → cameraFns-9AGyuZVp.js} +8 -11
- package/dist/{cameraFns-RHCb1F1s.cjs → cameraFns-CKUN90f_.cjs} +8 -11
- package/dist/{constants-ITRzCnCp.js → constants-iraOnb2p.js} +1 -2
- package/dist/{constants-BOVyEYGH.cjs → constants-oee0S_x6.cjs} +1 -2
- package/dist/core/errors.d.ts +3 -0
- package/dist/core.cjs +8 -8
- package/dist/core.js +8 -8
- package/dist/{cornerFinder-Dlae8IX5.js → cornerFinder-Cr_04etw.js} +4 -5
- package/dist/{cornerFinder-Cji_BK-R.cjs → cornerFinder-DJWo6h1Z.cjs} +4 -5
- package/dist/{curveFns-KS1BWGhF.js → curveFns-CkA2WJP2.js} +3 -4
- package/dist/{curveFns-6-ULFrEB.cjs → curveFns-U7srQ3ZA.cjs} +3 -4
- package/dist/{drawFns-3yRVBDgI.js → drawFns-C6bmFijD.js} +32 -45
- package/dist/{drawFns-Ddlgp9gQ.cjs → drawFns-DlCxozRP.cjs} +32 -45
- package/dist/{errors-jwhfQJZK.cjs → errors-GVyCnpi0.cjs} +6 -5
- package/dist/{errors-Zb3jBa0u.js → errors-vxP5FT8B.js} +6 -5
- package/dist/{faceFns-CTlJC5IY.js → faceFns-BBk6XKJO.js} +6 -8
- package/dist/{faceFns-CZeHWke7.cjs → faceFns-DSRREV5G.cjs} +6 -8
- package/dist/{faceRoleFns-CWU1-Pm8.js → faceRoleFns-BPxzQF-n.js} +1 -2
- package/dist/{faceRoleFns-CtH_48MO.cjs → faceRoleFns-Db5bYj4Q.cjs} +1 -2
- package/dist/{healingFns-DwSpJZfg.cjs → healingFns-C9G3yjOe.cjs} +148 -51
- package/dist/{healingFns-Ct3gEMvk.js → healingFns-CEr0afli.js} +148 -51
- package/dist/{helpers-NRZVshPb.cjs → helpers-JuPoaP_b.cjs} +15 -21
- package/dist/{helpers-BN1mVMuZ.js → helpers-sDialr0f.js} +15 -21
- package/dist/{importFns-BEi-HsSw.cjs → importFns-ClqPJCFR.cjs} +12 -19
- package/dist/{importFns-0kHGg-b8.js → importFns-DSUfSQn2.js} +12 -19
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/capabilities.d.ts +8 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -2
- package/dist/{loftFns-B5mq1WDh.js → loftFns-B8DSoG-F.js} +7 -10
- package/dist/{loftFns-DL9UsQhd.cjs → loftFns-mkJeOaII.cjs} +7 -10
- package/dist/{measureFns-D_GpQw5z.cjs → measureFns-BvNkzSR6.cjs} +6 -8
- package/dist/{measureFns-CyDVZomf.js → measureFns-PRM3gOjw.js} +6 -8
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-COlno8TY.js → meshFns-CgbT3uuO.js} +6 -8
- package/dist/{meshFns-CAxkaRTm.cjs → meshFns-W7ZTKqiJ.cjs} +6 -8
- package/dist/{occtWasmAdapter-CA6PmIIj.cjs → occtWasmAdapter-BSQeA69d.cjs} +49 -57
- package/dist/{occtWasmAdapter-BX10fyla.js → occtWasmAdapter-PzZJHUAd.js} +44 -58
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-DiHy5BZC.js → originTrackingFns-D8SNCDKj.js} +4 -5
- package/dist/{originTrackingFns-CWo6NWHK.cjs → originTrackingFns-DJDTRJh3.cjs} +4 -5
- package/dist/{planeOps-DJuclNxa.cjs → planeOps-C9d2Y56B.cjs} +5 -6
- package/dist/{planeOps-Cxws4Tiu.js → planeOps-Dp0YvuFE.js} +5 -6
- package/dist/{primitiveFns-ZV3aMbqG.cjs → primitiveFns-EtHyTqhw.cjs} +8 -10
- package/dist/{primitiveFns-CGJzS4MO.js → primitiveFns-W3RYNJcm.js} +8 -10
- package/dist/{principalBoxFns-BJgGEoik.js → principalBoxFns-Cbtty-2_.js} +7 -8
- package/dist/{principalBoxFns-5FSbxAj-.cjs → principalBoxFns-CmZa7qHi.cjs} +7 -8
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -2
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-CpVZoeOT.js → refResolveFns-BkciKtNP.js} +14 -21
- package/dist/{refResolveFns-Ct52Uw7R.cjs → refResolveFns-D99Vqe7a.cjs} +14 -21
- package/dist/result.cjs +2 -2
- package/dist/result.js +2 -2
- package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
- package/dist/{shapeFns-C2j6oZ2u.cjs → shapeFns-B54CsPyk.cjs} +5 -6
- package/dist/{shapeFns--1wNlcc_.js → shapeFns-DB3l3ULC.js} +5 -6
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -2
- package/dist/{shapeTypes-CqNJoSam.js → shapeTypes-CgbUTASh.js} +82 -161
- package/dist/{shapeTypes-DH2ShBU_.cjs → shapeTypes-D_anqiRe.cjs} +82 -161
- package/dist/sketching.cjs +4 -5
- package/dist/sketching.js +4 -5
- package/dist/{solidBuilders-CgicU3le.cjs → solidBuilders-CUd-korS.cjs} +17 -23
- package/dist/{solidBuilders-IstbiWju.js → solidBuilders-DE_na4G3.js} +17 -23
- package/dist/{surfaceBuilders-vYgSvgI6.cjs → surfaceBuilders-DOn2jWkh.cjs} +8 -12
- package/dist/{surfaceBuilders-8nLk2PWk.js → surfaceBuilders-wdGNiImD.js} +8 -12
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-fa7VHJZz.cjs → textBlueprints-BQ60Rc96.cjs} +24 -32
- package/dist/{textBlueprints-C13NAA3C.js → textBlueprints-B_jwMuej.js} +23 -31
- package/dist/{textMetrics--cikHkGX.cjs → textMetrics-Bm0a4kh7.cjs} +4 -6
- package/dist/{textMetrics-Dcc63qRm.js → textMetrics-Dj3yfZNQ.js} +4 -6
- package/dist/{threadFns-BUQPg_vI.cjs → threadFns-BuRPVenB.cjs} +21 -33
- package/dist/{threadFns-3U9x4v_M.js → threadFns-DlL5VnMf.js} +21 -33
- package/dist/topology/modifierFns.d.ts +5 -0
- package/dist/topology/thickResultCheck.d.ts +18 -0
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DnfjQgP7.js → topologyQueryFns-6M_dbT1R.js} +10 -10
- package/dist/{topologyQueryFns-q2bGyuEV.cjs → topologyQueryFns-ENxs8uu2.cjs} +15 -9
- package/dist/{types-D24Y27N0.js → types-CKXsIm9-.js} +1 -2
- package/dist/{types-KjA8tY4Y.cjs → types-CjF9Rofr.cjs} +1 -2
- package/dist/{validityTypes-r0A2YdNq.cjs → validityTypes-BPamqRZ8.cjs} +3 -4
- package/dist/{validityTypes-t7JpS0Ki.js → validityTypes-BTuI0vcR.js} +3 -4
- package/dist/{vecOps-CCnJt-yH.cjs → vecOps-CrGEPPQM.cjs} +1 -2
- package/dist/{vecOps-SKPRvPH-.js → vecOps-S-m9H_fe.js} +1 -2
- package/dist/vectors.cjs +4 -4
- package/dist/vectors.js +4 -4
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +1 -2
- package/dist/{workerPool-XcYX2UZ0.js → workerPool-Bc5hmJc4.js} +5 -10
- package/dist/{workerPool-D30NsiIW.cjs → workerPool-D5tiNXrI.cjs} +5 -10
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as wasmIndex, t as BrepBugError } from "./bug-
|
|
2
|
-
|
|
1
|
+
import { i as wasmIndex, t as BrepBugError } from "./bug-ClMTAJhe.js";
|
|
2
|
+
// src/kernel/capabilities.ts
|
|
3
3
|
/** Default for an exact B-rep kernel (OCCT family, brepkit). */
|
|
4
4
|
var EXACT_BREP_CAPABILITIES = {
|
|
5
5
|
exact: true,
|
|
@@ -7,6 +7,11 @@ var EXACT_BREP_CAPABILITIES = {
|
|
|
7
7
|
exactMeasurement: true,
|
|
8
8
|
tessellationModel: "extract-time"
|
|
9
9
|
};
|
|
10
|
+
/** OCCT-family kernels: exact B-rep with OCCT's own shape history. */
|
|
11
|
+
var OCCT_CAPABILITIES = {
|
|
12
|
+
...EXACT_BREP_CAPABILITIES,
|
|
13
|
+
nativeHistory: true
|
|
14
|
+
};
|
|
10
15
|
/**
|
|
11
16
|
* Conservative fallback for a kernel that doesn't declare capabilities: assume
|
|
12
17
|
* exact B-rep so export/measurement aren't wrongly blocked, but claim no
|
|
@@ -18,8 +23,7 @@ var DEFAULT_CAPABILITIES = {
|
|
|
18
23
|
exactMeasurement: true,
|
|
19
24
|
tessellationModel: "none"
|
|
20
25
|
};
|
|
21
|
-
|
|
22
|
-
//#region src/kernel/unsupported.ts
|
|
26
|
+
// src/kernel/unsupported.ts
|
|
23
27
|
/**
|
|
24
28
|
* Shared error for "this kernel doesn't implement this operation" — a stubbed
|
|
25
29
|
* adapter method (occt's brepkit-only stubs, occt-wasm's not-yet-implemented) or
|
|
@@ -41,8 +45,7 @@ var UnsupportedKernelOperationError = class extends Error {
|
|
|
41
45
|
function isUnsupportedKernelOperationError(error) {
|
|
42
46
|
return error instanceof Error && Reflect.get(error, UNSUPPORTED_MARKER) === true;
|
|
43
47
|
}
|
|
44
|
-
|
|
45
|
-
//#region src/kernel/hullGeometry.ts
|
|
48
|
+
// src/kernel/hullGeometry.ts
|
|
46
49
|
function sub(a, b) {
|
|
47
50
|
return {
|
|
48
51
|
x: a.x - b.x,
|
|
@@ -293,8 +296,7 @@ function quickHull(inputPoints, tolerance) {
|
|
|
293
296
|
points
|
|
294
297
|
};
|
|
295
298
|
}
|
|
296
|
-
|
|
297
|
-
//#region src/kernel/geometry2d.ts
|
|
299
|
+
// src/kernel/geometry2d.ts
|
|
298
300
|
/* v8 ignore file -- excluded from coverage reports; prevents V8 instrumentation
|
|
299
301
|
overhead that causes 2D-heavy tests to timeout under coverage mode. */
|
|
300
302
|
function evaluateCurve2d$1(c, t) {
|
|
@@ -1119,8 +1121,7 @@ function evaluateBSpline2d(c, t) {
|
|
|
1119
1121
|
}
|
|
1120
1122
|
return d[p];
|
|
1121
1123
|
}
|
|
1122
|
-
|
|
1123
|
-
//#region src/kernel/stlBuilder.ts
|
|
1124
|
+
// src/kernel/stlBuilder.ts
|
|
1124
1125
|
/**
|
|
1125
1126
|
* Kernel-agnostic STL serializers.
|
|
1126
1127
|
*
|
|
@@ -1224,8 +1225,7 @@ function buildAsciiSTL(vertices, triangles) {
|
|
|
1224
1225
|
lines.push("endsolid brepjs");
|
|
1225
1226
|
return lines.join("\n") + "\n";
|
|
1226
1227
|
}
|
|
1227
|
-
|
|
1228
|
-
//#region src/kernel/occtWasm/helpers.ts
|
|
1228
|
+
// src/kernel/occtWasm/helpers.ts
|
|
1229
1229
|
var noop = () => {};
|
|
1230
1230
|
/** Build an opaque kernel handle for an arena-allocated WASM shape. */
|
|
1231
1231
|
function handle(type, id) {
|
|
@@ -1358,8 +1358,7 @@ function parseEvolution(evo) {
|
|
|
1358
1358
|
evo.delete();
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
|
|
1362
|
-
//#region src/kernel/occtWasm/adapterShims.ts
|
|
1361
|
+
// src/kernel/occtWasm/adapterShims.ts
|
|
1363
1362
|
function wrapKernelExceptions(kernel, mod) {
|
|
1364
1363
|
return new Proxy(kernel, { get(target, prop, receiver) {
|
|
1365
1364
|
const val = Reflect.get(target, prop, receiver);
|
|
@@ -1411,8 +1410,7 @@ function buildOcShim(module, k) {
|
|
|
1411
1410
|
}
|
|
1412
1411
|
});
|
|
1413
1412
|
}
|
|
1414
|
-
|
|
1415
|
-
//#region src/kernel/occtWasm/booleanOps.ts
|
|
1413
|
+
// src/kernel/occtWasm/booleanOps.ts
|
|
1416
1414
|
var BOOLEAN_OP_CODE = {
|
|
1417
1415
|
fuse: 0,
|
|
1418
1416
|
cut: 1,
|
|
@@ -1626,8 +1624,7 @@ function checkBoolean(k, shape, tool, _op) {
|
|
|
1626
1624
|
function meshBoolean(_positionsA, _indicesA, _positionsB, _indicesB, _op, _tolerance) {
|
|
1627
1625
|
throw new Error("occt-wasm: meshBoolean is not supported (use brepkit for mesh booleans)");
|
|
1628
1626
|
}
|
|
1629
|
-
|
|
1630
|
-
//#region src/kernel/occtWasm/primitiveOps.ts
|
|
1627
|
+
// src/kernel/occtWasm/primitiveOps.ts
|
|
1631
1628
|
/**
|
|
1632
1629
|
* Apply an id-remapping positioning step (rotate/translate), releasing the
|
|
1633
1630
|
* orphaned source slot. rotate/translate return fresh arena slots on occt-wasm;
|
|
@@ -1673,8 +1670,7 @@ function makeBoxFromCorners(k, p1, p2) {
|
|
|
1673
1670
|
function makeRectangle(k, width, height) {
|
|
1674
1671
|
return handle("face", k.makeRectangle(width, height));
|
|
1675
1672
|
}
|
|
1676
|
-
|
|
1677
|
-
//#region src/kernel/occtWasm/topologyOps.ts
|
|
1673
|
+
// src/kernel/occtWasm/topologyOps.ts
|
|
1678
1674
|
function iterShapes(k, shape, type) {
|
|
1679
1675
|
const vec = k.getSubShapes(unwrap(shape), type);
|
|
1680
1676
|
const results = [];
|
|
@@ -1772,8 +1768,7 @@ function sew(k, Module, shapes, tolerance) {
|
|
|
1772
1768
|
vec.delete();
|
|
1773
1769
|
}
|
|
1774
1770
|
}
|
|
1775
|
-
|
|
1776
|
-
//#region src/kernel/occtWasm/repairOps.ts
|
|
1771
|
+
// src/kernel/occtWasm/repairOps.ts
|
|
1777
1772
|
var HEAL_TOLERANCE = 1e-6;
|
|
1778
1773
|
function isValid(k, shape) {
|
|
1779
1774
|
return k.isValid(unwrap(shape));
|
|
@@ -1803,8 +1798,7 @@ function fixFaceOrientations(k, shape) {
|
|
|
1803
1798
|
function fixShape(k, shape) {
|
|
1804
1799
|
return wrapResult(k, k.fixShape(unwrap(shape)));
|
|
1805
1800
|
}
|
|
1806
|
-
|
|
1807
|
-
//#region src/kernel/occtWasm/meshOps.ts
|
|
1801
|
+
// src/kernel/occtWasm/meshOps.ts
|
|
1808
1802
|
function mesh(k, Module, shape, options) {
|
|
1809
1803
|
const meshData = k.tessellate(unwrap(shape), options.tolerance, options.angularTolerance);
|
|
1810
1804
|
try {
|
|
@@ -1895,8 +1889,7 @@ function hasTriangulation(k, shape) {
|
|
|
1895
1889
|
function meshShape(k, shape, tolerance, angularTolerance) {
|
|
1896
1890
|
k.meshShape(unwrap(shape), tolerance, angularTolerance).delete();
|
|
1897
1891
|
}
|
|
1898
|
-
|
|
1899
|
-
//#region src/kernel/occtWasm/curveOps.ts
|
|
1892
|
+
// src/kernel/occtWasm/curveOps.ts
|
|
1900
1893
|
var CURVE_TYPE_MAP = {
|
|
1901
1894
|
line: "LINE",
|
|
1902
1895
|
circle: "CIRCLE",
|
|
@@ -2046,8 +2039,7 @@ function getNurbsCurveData(k, edge) {
|
|
|
2046
2039
|
return null;
|
|
2047
2040
|
}
|
|
2048
2041
|
}
|
|
2049
|
-
|
|
2050
|
-
//#region src/kernel/occtWasm/surfaceOps.ts
|
|
2042
|
+
// src/kernel/occtWasm/surfaceOps.ts
|
|
2051
2043
|
function vertexPosition(k, vertex) {
|
|
2052
2044
|
const vec = k.vertexPosition(unwrap(vertex));
|
|
2053
2045
|
try {
|
|
@@ -2327,8 +2319,7 @@ function projectEdges(k, Module, shape, cameraOrigin, cameraDirection, cameraXAx
|
|
|
2327
2319
|
}
|
|
2328
2320
|
};
|
|
2329
2321
|
}
|
|
2330
|
-
|
|
2331
|
-
//#region src/kernel/occtWasm/measureOps.ts
|
|
2322
|
+
// src/kernel/occtWasm/measureOps.ts
|
|
2332
2323
|
function volume(k, shape) {
|
|
2333
2324
|
return k.getVolume(unwrap(shape));
|
|
2334
2325
|
}
|
|
@@ -2457,13 +2448,18 @@ function collectDistanceSamples(k, mod, shapeId) {
|
|
|
2457
2448
|
try {
|
|
2458
2449
|
const n = verts.size();
|
|
2459
2450
|
for (let i = 0; i < n; i++) {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2462
|
-
p.
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2451
|
+
const vertexId = verts.get(i);
|
|
2452
|
+
try {
|
|
2453
|
+
const p = k.vertexPosition(vertexId);
|
|
2454
|
+
out.push([
|
|
2455
|
+
p.get(0),
|
|
2456
|
+
p.get(1),
|
|
2457
|
+
p.get(2)
|
|
2458
|
+
]);
|
|
2459
|
+
p.delete();
|
|
2460
|
+
} finally {
|
|
2461
|
+
k.release(vertexId);
|
|
2462
|
+
}
|
|
2467
2463
|
}
|
|
2468
2464
|
} finally {
|
|
2469
2465
|
verts.delete();
|
|
@@ -2752,8 +2748,7 @@ function surfaceCurvature(k, face, u, v) {
|
|
|
2752
2748
|
minDirection
|
|
2753
2749
|
};
|
|
2754
2750
|
}
|
|
2755
|
-
|
|
2756
|
-
//#region src/kernel/occtWasm/modifierOps.ts
|
|
2751
|
+
// src/kernel/occtWasm/modifierOps.ts
|
|
2757
2752
|
var HASH_UPPER_BOUND = 2147483647;
|
|
2758
2753
|
function fillet(k, Module, shape, edges, radius) {
|
|
2759
2754
|
const r = resolveUniformRadius(edges, radius);
|
|
@@ -2889,8 +2884,7 @@ function simplify(k, shape) {
|
|
|
2889
2884
|
function reverseShape(k, shape) {
|
|
2890
2885
|
return wrapResult(k, k.reverseShape(unwrap(shape)));
|
|
2891
2886
|
}
|
|
2892
|
-
|
|
2893
|
-
//#region src/kernel/occtWasm/sweepOps.ts
|
|
2887
|
+
// src/kernel/occtWasm/sweepOps.ts
|
|
2894
2888
|
var SWEEP_MODE_FIXED = 0;
|
|
2895
2889
|
var SWEEP_MODE_FRENET = 1;
|
|
2896
2890
|
var SWEEP_MODE_AUXILIARY = 3;
|
|
@@ -3077,8 +3071,7 @@ function draftPrism(k, shape, _face, _baseFace, height, angleDeg, _fuse) {
|
|
|
3077
3071
|
const h = height ?? 10;
|
|
3078
3072
|
return wrapResult(k, k.draftPrism(unwrap(shape), 0, 0, h, angleDeg));
|
|
3079
3073
|
}
|
|
3080
|
-
|
|
3081
|
-
//#region src/kernel/occtWasm/transformOps.ts
|
|
3074
|
+
// src/kernel/occtWasm/transformOps.ts
|
|
3082
3075
|
function composeTransform(ops) {
|
|
3083
3076
|
let matrix = [
|
|
3084
3077
|
1,
|
|
@@ -3381,8 +3374,7 @@ function transformBatch(k, entries) {
|
|
|
3381
3374
|
}
|
|
3382
3375
|
});
|
|
3383
3376
|
}
|
|
3384
|
-
|
|
3385
|
-
//#region src/kernel/occtWasm/ioOps.ts
|
|
3377
|
+
// src/kernel/occtWasm/ioOps.ts
|
|
3386
3378
|
function computePositionBounds(positions, vCount) {
|
|
3387
3379
|
if (vCount === 0) return {
|
|
3388
3380
|
min: [
|
|
@@ -3697,8 +3689,7 @@ function exportSTEPConfigured(k, Module, shapes, _options) {
|
|
|
3697
3689
|
doc.delete();
|
|
3698
3690
|
}
|
|
3699
3691
|
}
|
|
3700
|
-
|
|
3701
|
-
//#region src/kernel/occtWasm/constructionOps.ts
|
|
3692
|
+
// src/kernel/occtWasm/constructionOps.ts
|
|
3702
3693
|
function makeVertex(k, x, y, z) {
|
|
3703
3694
|
return handle("vertex", k.makeVertex(x, y, z));
|
|
3704
3695
|
}
|
|
@@ -3982,8 +3973,7 @@ function createAxis3(ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
|
3982
3973
|
delete: noop
|
|
3983
3974
|
};
|
|
3984
3975
|
}
|
|
3985
|
-
|
|
3986
|
-
//#region src/kernel/occtWasm/kernel2dOps.ts
|
|
3976
|
+
// src/kernel/occtWasm/kernel2dOps.ts
|
|
3987
3977
|
function c2d(h) {
|
|
3988
3978
|
return h;
|
|
3989
3979
|
}
|
|
@@ -4666,8 +4656,7 @@ function buildCurves3d(k, wire) {
|
|
|
4666
4656
|
function fixWireOnFace(k, wire, face, tolerance) {
|
|
4667
4657
|
return handle("wire", k.fixWireOnFace(unwrap(wire), unwrap(face), tolerance));
|
|
4668
4658
|
}
|
|
4669
|
-
|
|
4670
|
-
//#region src/kernel/occtWasm/evolutionOps.ts
|
|
4659
|
+
// src/kernel/occtWasm/evolutionOps.ts
|
|
4671
4660
|
/**
|
|
4672
4661
|
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
4673
4662
|
* The C++ facade returns flat vectors of [inputHash, count, out1, out2, ..., inputHash, count, ...].
|
|
@@ -4945,8 +4934,7 @@ function applyComposedTransformWithHistory(transformFn, iterShapesFn, hashCodeFn
|
|
|
4945
4934
|
}
|
|
4946
4935
|
};
|
|
4947
4936
|
}
|
|
4948
|
-
|
|
4949
|
-
//#region src/kernel/occtWasm/hullOps.ts
|
|
4937
|
+
// src/kernel/occtWasm/hullOps.ts
|
|
4950
4938
|
function hullFromPoints(k, Module, points, tolerance) {
|
|
4951
4939
|
if (points.length < 4) throw new Error("hullFromPoints: need at least 4 points");
|
|
4952
4940
|
const { points: hullPoints, faces } = quickHull(points, tolerance);
|
|
@@ -4983,8 +4971,7 @@ function hull(k, Module, shapes, tolerance) {
|
|
|
4983
4971
|
if (points.length < 4) throw new Error("hull: fewer than 4 vertices extracted from input shapes");
|
|
4984
4972
|
return hullFromPoints(k, Module, points, tolerance);
|
|
4985
4973
|
}
|
|
4986
|
-
|
|
4987
|
-
//#region src/kernel/occtWasm/occtWasmAdapter.ts
|
|
4974
|
+
// src/kernel/occtWasm/occtWasmAdapter.ts
|
|
4988
4975
|
/**
|
|
4989
4976
|
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
4990
4977
|
*
|
|
@@ -4997,7 +4984,7 @@ function notImplemented(method) {
|
|
|
4997
4984
|
var OcctWasmAdapter = class OcctWasmAdapter {
|
|
4998
4985
|
oc;
|
|
4999
4986
|
kernelId = "occt-wasm";
|
|
5000
|
-
capabilities =
|
|
4987
|
+
capabilities = OCCT_CAPABILITIES;
|
|
5001
4988
|
Module;
|
|
5002
4989
|
k;
|
|
5003
4990
|
owner;
|
|
@@ -5839,5 +5826,4 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5839
5826
|
return getNurbsCurveData(this.k, edge);
|
|
5840
5827
|
}
|
|
5841
5828
|
};
|
|
5842
|
-
|
|
5843
|
-
export { EXACT_BREP_CAPABILITIES as A, serializeCurve2d$1 as C, UnsupportedKernelOperationError as D, quickHull as E, isUnsupportedKernelOperationError as O, scaleCurve2d$1 as S, translateCurve2d$1 as T, makeEllipse2d$1 as _, buildBinarySTL as a, mirrorAtPoint as b, curveBounds as c, evaluateCurve2d$1 as d, intersectCurves2dFn as f, makeCircle2d$1 as g, makeBezier2d$1 as h, buildAsciiSTL as i, DEFAULT_CAPABILITIES as k, curveTypeName as l, makeArc2dThreePoints$1 as m, DEFAULT_STL_ANGULAR_TOLERANCE as n, addCurveToBBox as o, makeArc2dTangent$1 as p, DEFAULT_STL_TOLERANCE as r, createBBox2d as s, OcctWasmAdapter as t, deserializeCurve2d$1 as u, makeLine2d$1 as v, tangentCurve2d as w, rotateCurve2d$1 as x, mirrorAcrossAxis as y };
|
|
5829
|
+
export { EXACT_BREP_CAPABILITIES as A, serializeCurve2d$1 as C, UnsupportedKernelOperationError as D, quickHull as E, isUnsupportedKernelOperationError as O, scaleCurve2d$1 as S, translateCurve2d$1 as T, makeEllipse2d$1 as _, buildBinarySTL as a, mirrorAtPoint as b, curveBounds as c, evaluateCurve2d$1 as d, intersectCurves2dFn as f, makeCircle2d$1 as g, makeBezier2d$1 as h, buildAsciiSTL as i, OCCT_CAPABILITIES as j, DEFAULT_CAPABILITIES as k, curveTypeName as l, makeArc2dThreePoints$1 as m, DEFAULT_STL_ANGULAR_TOLERANCE as n, addCurveToBBox as o, makeArc2dTangent$1 as p, DEFAULT_STL_TOLERANCE as r, createBBox2d as s, OcctWasmAdapter as t, deserializeCurve2d$1 as u, makeLine2d$1 as v, tangentCurve2d as w, rotateCurve2d$1 as x, mirrorAcrossAxis as y };
|
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-BuRPVenB.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-mkJeOaII.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-DlL5VnMf.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-B8DSoG-F.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,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
3
|
-
import { n as HASH_CODE_MAX } from "./constants-
|
|
4
|
-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-6M_dbT1R.js";
|
|
3
|
+
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
4
|
+
// src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Face origin tracking — tag faces with integer origins and propagate
|
|
7
7
|
* them through kernel operations via ShapeEvolution records.
|
|
@@ -199,5 +199,4 @@ function propagateOriginsByHash(inputs, result) {
|
|
|
199
199
|
cache.faceOrigins = resultMap;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
//#endregion
|
|
203
202
|
export { setShapeOrigin as i, propagateOriginsByHash as n, propagateOriginsFromEvolution as r, getFaceOrigins as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_constants = require("./constants-
|
|
4
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ENxs8uu2.cjs");
|
|
3
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
4
|
+
// src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Face origin tracking — tag faces with integer origins and propagate
|
|
7
7
|
* them through kernel operations via ShapeEvolution records.
|
|
@@ -199,7 +199,6 @@ function propagateOriginsByHash(inputs, result) {
|
|
|
199
199
|
cache.faceOrigins = resultMap;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
//#endregion
|
|
203
202
|
Object.defineProperty(exports, "getFaceOrigins", {
|
|
204
203
|
enumerable: true,
|
|
205
204
|
get: function() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_constants = require("./constants-
|
|
3
|
-
const require_types = require("./types-
|
|
4
|
-
const require_vecOps = require("./vecOps-
|
|
5
|
-
|
|
1
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
2
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
3
|
+
const require_types = require("./types-CjF9Rofr.cjs");
|
|
4
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
5
|
+
// src/core/planeOps.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a {@link Plane} from an origin, optional X direction, and a normal.
|
|
8
8
|
*
|
|
@@ -274,7 +274,6 @@ function pivotPlane(plane, angleDeg, axis = [
|
|
|
274
274
|
zDir: newZDir
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
//#endregion
|
|
278
277
|
Object.defineProperty(exports, "createNamedPlane", {
|
|
279
278
|
enumerable: true,
|
|
280
279
|
get: function() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-
|
|
2
|
-
import { t as DEG2RAD } from "./constants-
|
|
3
|
-
import { r as toVec3 } from "./types-
|
|
4
|
-
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-
|
|
5
|
-
|
|
1
|
+
import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-vxP5FT8B.js";
|
|
2
|
+
import { t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
3
|
+
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
4
|
+
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
5
|
+
// src/core/planeOps.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a {@link Plane} from an origin, optional X direction, and a normal.
|
|
8
8
|
*
|
|
@@ -274,5 +274,4 @@ function pivotPlane(plane, angleDeg, axis = [
|
|
|
274
274
|
zDir: newZDir
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
//#endregion
|
|
278
277
|
export { planeToWorld as a, pivotPlane as i, createPlane as n, resolvePlane as o, makePlane as r, translatePlane as s, createNamedPlane as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
4
|
-
const require_constants = require("./constants-
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
7
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_validityTypes = require("./validityTypes-BPamqRZ8.cjs");
|
|
4
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-CUd-korS.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DOn2jWkh.cjs");
|
|
7
|
+
// src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
10
10
|
* All functions return new shapes without disposing inputs.
|
|
@@ -269,8 +269,7 @@ function transformCopy(shape, composed) {
|
|
|
269
269
|
require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
|
|
270
270
|
return result;
|
|
271
271
|
}
|
|
272
|
-
|
|
273
|
-
//#region src/topology/primitiveFns.ts
|
|
272
|
+
// src/topology/primitiveFns.ts
|
|
274
273
|
/**
|
|
275
274
|
* Create a box with the given dimensions.
|
|
276
275
|
*
|
|
@@ -593,7 +592,6 @@ function sewShells(facesOrShells, ignoreType) {
|
|
|
593
592
|
function addHoles(f, holes) {
|
|
594
593
|
return require_surfaceBuilders.addHolesInFace(f, holes);
|
|
595
594
|
}
|
|
596
|
-
//#endregion
|
|
597
595
|
Object.defineProperty(exports, "addHoles", {
|
|
598
596
|
enumerable: true,
|
|
599
597
|
get: function() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
4
|
-
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-
|
|
5
|
-
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, 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, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-
|
|
6
|
-
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-
|
|
7
|
-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-BTuI0vcR.js";
|
|
4
|
+
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
|
+
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, 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, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-DE_na4G3.js";
|
|
6
|
+
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-wdGNiImD.js";
|
|
7
|
+
// src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
10
10
|
* All functions return new shapes without disposing inputs.
|
|
@@ -269,8 +269,7 @@ function transformCopy(shape, composed) {
|
|
|
269
269
|
propagateAllMetadata(evolution, [shape], result);
|
|
270
270
|
return result;
|
|
271
271
|
}
|
|
272
|
-
|
|
273
|
-
//#region src/topology/primitiveFns.ts
|
|
272
|
+
// src/topology/primitiveFns.ts
|
|
274
273
|
/**
|
|
275
274
|
* Create a box with the given dimensions.
|
|
276
275
|
*
|
|
@@ -593,5 +592,4 @@ function sewShells(facesOrShells, ignoreType) {
|
|
|
593
592
|
function addHoles(f, holes) {
|
|
594
593
|
return addHolesInFace(f, holes);
|
|
595
594
|
}
|
|
596
|
-
//#endregion
|
|
597
595
|
export { locate as A, threePointArc as C, wireLoop as D, wire as E, transformCopy as F, translate as I, resize as M, rotate as N, applyMatrix as O, scale as P, tangentArc as S, vertex as T, polygon as _, circle as a, sphere as b, cylinder as c, ellipsoid as d, face as f, offsetFace as g, line as h, bsplineApprox as i, mirror as j, composeTransforms as k, ellipse as l, helix as m, bezier as n, compound as o, filledFace as p, box as r, cone as s, addHoles as t, ellipseArc as u, sewShells as v, torus as w, subFace as x, solid as y };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { i as wasmIndex } from "./bug-
|
|
3
|
-
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-
|
|
4
|
-
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-
|
|
5
|
-
import { r as vecCross } from "./vecOps-
|
|
6
|
-
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-
|
|
7
|
-
|
|
1
|
+
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
3
|
+
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-vxP5FT8B.js";
|
|
4
|
+
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-6M_dbT1R.js";
|
|
5
|
+
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
+
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-PRM3gOjw.js";
|
|
7
|
+
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
10
10
|
* principal axes of inertia instead of the world axes.
|
|
@@ -203,5 +203,4 @@ function principalBoundingBox(shape) {
|
|
|
203
203
|
setCachedMeasurement(shape.wrapped, "principal", result);
|
|
204
204
|
return ok(result);
|
|
205
205
|
}
|
|
206
|
-
//#endregion
|
|
207
206
|
export { principalBoundingBox as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_bug = require("./bug-
|
|
3
|
-
const require_errors = require("./errors-
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
-
const require_vecOps = require("./vecOps-
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
7
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ENxs8uu2.cjs");
|
|
5
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-BvNkzSR6.cjs");
|
|
7
|
+
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
10
10
|
* principal axes of inertia instead of the world axes.
|
|
@@ -203,7 +203,6 @@ function principalBoundingBox(shape) {
|
|
|
203
203
|
require_measureFns.setCachedMeasurement(shape.wrapped, "principal", result);
|
|
204
204
|
return require_errors.ok(result);
|
|
205
205
|
}
|
|
206
|
-
//#endregion
|
|
207
206
|
Object.defineProperty(exports, "principalBoundingBox", {
|
|
208
207
|
enumerable: true,
|
|
209
208
|
get: function() {
|
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-CKUN90f_.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,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
|
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-9AGyuZVp.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-JuPoaP_b.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-DJWo6h1Z.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-sDialr0f.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-Cr_04etw.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
4
|
-
import { t as getFaceRoles } from "./faceRoleFns-
|
|
5
|
-
import { n as getHashCode } from "./shapeFns
|
|
6
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
7
|
-
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-
|
|
8
|
-
|
|
1
|
+
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-6M_dbT1R.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-BBk6XKJO.js";
|
|
4
|
+
import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
5
|
+
import { n as getHashCode } from "./shapeFns-DB3l3ULC.js";
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-PRM3gOjw.js";
|
|
7
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-BgJQQjdt.js";
|
|
8
|
+
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
11
11
|
* and area similarity.
|
|
@@ -47,8 +47,7 @@ function defaultScorer(hint, face) {
|
|
|
47
47
|
}
|
|
48
48
|
return score;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
//#region src/topology/shapeRef/shapeRefFns.ts
|
|
50
|
+
// src/topology/shapeRef/shapeRefFns.ts
|
|
52
51
|
/** Snapshot the geometric properties of a face for later matching. */
|
|
53
52
|
function captureHint(face) {
|
|
54
53
|
const surfaceType = faceGeomType(face);
|
|
@@ -294,8 +293,7 @@ function resolveRef(ref, roles, currentShape, scorer) {
|
|
|
294
293
|
reason: "not-found"
|
|
295
294
|
};
|
|
296
295
|
}
|
|
297
|
-
|
|
298
|
-
//#region src/topology/shapeRef/roleLookup.ts
|
|
296
|
+
// src/topology/shapeRef/roleLookup.ts
|
|
299
297
|
/** Euclidean distance between two points. */
|
|
300
298
|
function distance(a, b) {
|
|
301
299
|
const dx = a[0] - b[0];
|
|
@@ -335,8 +333,7 @@ function facesForRole(shape, origin, role, roles) {
|
|
|
335
333
|
if (hashes === void 0 || hashes.length === 0) return [];
|
|
336
334
|
return getFaces(shape).filter((f) => hashes.includes(getHashCode(f)));
|
|
337
335
|
}
|
|
338
|
-
|
|
339
|
-
//#region src/topology/shapeRef/edgeRefFns.ts
|
|
336
|
+
// src/topology/shapeRef/edgeRefFns.ts
|
|
340
337
|
function captureEdgeHint(edge) {
|
|
341
338
|
const lengthResult = measureLength(edge);
|
|
342
339
|
return {
|
|
@@ -447,8 +444,7 @@ function resolveEdgeRef(ref, roles, shape) {
|
|
|
447
444
|
reason: "not-found"
|
|
448
445
|
};
|
|
449
446
|
}
|
|
450
|
-
|
|
451
|
-
//#region src/topology/shapeRef/vertexRefFns.ts
|
|
447
|
+
// src/topology/shapeRef/vertexRefFns.ts
|
|
452
448
|
/** A corner needs at least this many faces to pin a unique point. */
|
|
453
449
|
var MIN_VERTEX_FACES = 3;
|
|
454
450
|
/** Hint distances closer than this are indistinguishable (→ ambiguous). */
|
|
@@ -564,8 +560,7 @@ function resolveVertexRef(ref, roles, shape) {
|
|
|
564
560
|
reason: "not-found"
|
|
565
561
|
};
|
|
566
562
|
}
|
|
567
|
-
|
|
568
|
-
//#region src/topology/shapeRef/derivedFaceRefFns.ts
|
|
563
|
+
// src/topology/shapeRef/derivedFaceRefFns.ts
|
|
569
564
|
/** A face re-derives a bridged face when its normal is nearly identical. */
|
|
570
565
|
var NORMAL_MATCH = .99;
|
|
571
566
|
/** A generated face's normal has a positive component along BOTH bridged normals. */
|
|
@@ -681,8 +676,7 @@ function resolveDerivedFaceRef(ref, roles, shape) {
|
|
|
681
676
|
reason: "not-found"
|
|
682
677
|
};
|
|
683
678
|
}
|
|
684
|
-
|
|
685
|
-
//#region src/topology/shapeRef/refResolveFns.ts
|
|
679
|
+
// src/topology/shapeRef/refResolveFns.ts
|
|
686
680
|
function isRefObject(v) {
|
|
687
681
|
return typeof v === "object" && v !== null && "origin" in v;
|
|
688
682
|
}
|
|
@@ -806,5 +800,4 @@ function resolveRefParams(params, shape) {
|
|
|
806
800
|
for (const [key, value] of Object.entries(params)) out[key] = resolveValue(value);
|
|
807
801
|
return out;
|
|
808
802
|
}
|
|
809
|
-
//#endregion
|
|
810
803
|
export { createRef as _, isVertexRef as a, defaultScorer as b, resolveRefParams as c, createVertexRef as d, resolveVertexRef as f, captureHint as g, assignRoles as h, isLineageRef as i, createDerivedFaceRef as l, resolveEdgeRef as m, isEdgeRef as n, resolveLineageRef as o, createEdgeRef as p, isFaceRef as r, resolveRefIn as s, isDerivedFaceRef as t, resolveDerivedFaceRef as u, resolveRef as v, updateRoles as y };
|