@ifc-lite/clash 2.3.1 → 2.4.2
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/adapters/step.js +1 -0
- package/dist/adapters/step.js.map +1 -1
- package/dist/analysis.d.ts +6 -6
- package/dist/analysis.d.ts.map +1 -1
- package/dist/analysis.js +30 -29
- package/dist/analysis.js.map +1 -1
- package/dist/contact/narrow-phase.js +1 -1
- package/dist/engine-ts/broad.d.ts.map +1 -1
- package/dist/engine-ts/broad.js +11 -10
- package/dist/engine-ts/broad.js.map +1 -1
- package/dist/engine-ts/depth.d.ts +83 -11
- package/dist/engine-ts/depth.d.ts.map +1 -1
- package/dist/engine-ts/depth.js +134 -67
- package/dist/engine-ts/depth.js.map +1 -1
- package/dist/engine-ts/kernel.d.ts +2 -0
- package/dist/engine-ts/kernel.d.ts.map +1 -1
- package/dist/engine-ts/narrow.d.ts +8 -0
- package/dist/engine-ts/narrow.d.ts.map +1 -1
- package/dist/engine-ts/narrow.js +24 -15
- package/dist/engine-ts/narrow.js.map +1 -1
- package/dist/engine-ts/obb-detect.d.ts +3 -0
- package/dist/engine-ts/obb-detect.d.ts.map +1 -0
- package/dist/engine-ts/obb-detect.js +298 -0
- package/dist/engine-ts/obb-detect.js.map +1 -0
- package/dist/engine-ts/obb.d.ts +14 -23
- package/dist/engine-ts/obb.d.ts.map +1 -1
- package/dist/engine-ts/obb.js +35 -140
- package/dist/engine-ts/obb.js.map +1 -1
- package/dist/engine-ts/orchestrator.d.ts.map +1 -1
- package/dist/engine-ts/orchestrator.js +59 -15
- package/dist/engine-ts/orchestrator.js.map +1 -1
- package/dist/engine-ts/tri-mesh.d.ts +10 -7
- package/dist/engine-ts/tri-mesh.d.ts.map +1 -1
- package/dist/engine-ts/tri-mesh.js +34 -28
- package/dist/engine-ts/tri-mesh.js.map +1 -1
- package/dist/engine-ts/ts-kernel.d.ts.map +1 -1
- package/dist/engine-ts/ts-kernel.js +1 -0
- package/dist/engine-ts/ts-kernel.js.map +1 -1
- package/dist/engine-wasm/wasm-kernel.d.ts.map +1 -1
- package/dist/engine-wasm/wasm-kernel.js +10 -1
- package/dist/engine-wasm/wasm-kernel.js.map +1 -1
- package/dist/math/aabb.d.ts +9 -0
- package/dist/math/aabb.d.ts.map +1 -1
- package/dist/math/aabb.js +13 -0
- package/dist/math/aabb.js.map +1 -1
- package/dist/math/generated/plato.g.d.ts +11 -2
- package/dist/math/generated/plato.g.d.ts.map +1 -1
- package/dist/math/generated/plato.g.js +347 -190
- package/dist/math/generated/plato.g.js.map +1 -1
- package/dist/math/triangle-intersect.d.ts +12 -6
- package/dist/math/triangle-intersect.d.ts.map +1 -1
- package/dist/math/triangle-intersect.js +12 -6
- package/dist/math/triangle-intersect.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +10 -10
package/dist/adapters/step.js
CHANGED
|
@@ -61,6 +61,7 @@ function syntheticKey(modelId, expressId) {
|
|
|
61
61
|
*/
|
|
62
62
|
function storeHasAnyGlobalId(store) {
|
|
63
63
|
const { entities } = store;
|
|
64
|
+
// @raw-entity-enumeration-ok fallback source-metadata probe asks whether the parsed file carries any GlobalId, not for live clash membership
|
|
64
65
|
for (let i = 0; i < entities.count; i += 1) {
|
|
65
66
|
if (entities.getGlobalId(entities.expressId[i]))
|
|
66
67
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../src/adapters/step.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAe/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC7D,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IAC1E,EAAE;IACF,6EAA6E;IAC7E,6CAA6C;IAC7C,IACE,QAAQ,CAAC,MAAM,GAAG,CAAC;QACnB,gBAAgB,KAAK,QAAQ,CAAC,MAAM;QACpC,mBAAmB,CAAC,KAAK,CAAC,EAC1B,CAAC;QACD,OAAO,CAAC,IAAI,CACV,wCAAwC,OAAO,MAAM,QAAQ,CAAC,MAAM,mBAAmB;YACrF,8DAA8D,YAAY,aAAa;YACvF,wFAAwF;YACxF,sFAAsF;YACtF,eAAe,CAClB,CAAC;IACJ,CAAC;IAED,0EAA0E;IAC1E,sEAAsE;IACtE,+DAA+D;IAC/D,IAAI,sBAAsB,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,IAAI,CACV,wBAAwB,sBAAsB,4BAA4B,OAAO,KAAK;YACpF,oFAAoF;YACpF,qFAAqF;YACrF,0DAA0D,CAC7D,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,eAAe;QAChC,CAAC,CAAC,mBAAmB,CAAC,KAAK,EAAE,WAAW,CAAC;QACzC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAEvB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAClC,CAAC;AAED,kFAAkF;AAClF,+EAA+E;AAC/E,+EAA+E;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/analysis.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ export declare const SEVERITY_RANK: Record<ClashSeverity, number>;
|
|
|
31
31
|
export declare function penetrationDepth(c: Clash): number;
|
|
32
32
|
/** Default band (m) under which a `hard` clash is really a face/edge *contact*
|
|
33
33
|
* rather than a genuine interpenetration — see {@link isTouching}. Also the
|
|
34
|
-
* floor for {@link touchingEpsilonFor}'s
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* floor for {@link touchingEpsilonFor}'s default: the band only grows past
|
|
35
|
+
* it when the clash's own depth floor (or, for a clash without one, its
|
|
36
|
+
* coordinate magnitude) exceeds it. */
|
|
37
37
|
export declare const TOUCHING_EPSILON = 0.0001;
|
|
38
38
|
/**
|
|
39
39
|
* Whether a clash is effectively a zero-distance *contact* rather than a real
|
|
@@ -42,9 +42,9 @@ export declare const TOUCHING_EPSILON = 0.0001;
|
|
|
42
42
|
* slab, a column sitting on a footing) reported with a ~0 m depth, which users
|
|
43
43
|
* reasonably distrust when they appear in the clash list.
|
|
44
44
|
*
|
|
45
|
-
* `eps` defaults to {@link touchingEpsilonFor}
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* `eps` defaults to {@link touchingEpsilonFor}: the clash's own depth floor
|
|
46
|
+
* when the engine recorded one, else the older coordinate-magnitude band (see
|
|
47
|
+
* that function). An explicit `eps` overrides the default entirely.
|
|
48
48
|
*/
|
|
49
49
|
export declare function isTouching(c: Clash, eps?: number): boolean;
|
|
50
50
|
/**
|
package/dist/analysis.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEhH;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,YAAY,CAWxE;AAED,uEAAuE;AACvE,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKvD,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAEjD;AAED;;;;
|
|
1
|
+
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW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
41
|
}
|
|
42
42
|
/** Default band (m) under which a `hard` clash is really a face/edge *contact*
|
|
43
43
|
* rather than a genuine interpenetration — see {@link isTouching}. Also the
|
|
44
|
-
* floor for {@link touchingEpsilonFor}'s
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* floor for {@link touchingEpsilonFor}'s default: the band only grows past
|
|
45
|
+
* it when the clash's own depth floor (or, for a clash without one, its
|
|
46
|
+
* coordinate magnitude) exceeds it. */
|
|
47
47
|
export const TOUCHING_EPSILON = 1e-4;
|
|
48
48
|
/**
|
|
49
|
-
* f32-ULP scale factor for
|
|
50
|
-
*
|
|
51
|
-
* larger magnitudes the ULP only grows. Same term (and reasoning) as
|
|
52
|
-
* `precisionFloor` in `engine-ts/narrow.ts` and `narrowPhase`'s `planeEps` in
|
|
53
|
-
* `contact/narrow-phase.ts` — kept local because this is a different job
|
|
54
|
-
* (the *reported* touching band, not the narrow-phase's own depth floor) on
|
|
55
|
-
* a `Clash`, which doesn't carry the element bounds those two derive from.
|
|
49
|
+
* f32-ULP scale factor (2^-22), for the legacy band only: see
|
|
50
|
+
* {@link touchingEpsilonFor}'s fallback.
|
|
56
51
|
*/
|
|
57
52
|
const F32_ULP_SCALE = 1 / 4_194_304; // 2^-22
|
|
58
53
|
/**
|
|
59
|
-
* The touching band for one specific clash
|
|
60
|
-
* coordinate magnitude rather than a fixed constant.
|
|
54
|
+
* The touching band for one specific clash.
|
|
61
55
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
56
|
+
* A clash from the engine carries {@link Clash.depthFloor}: the f32 noise
|
|
57
|
+
* floor of its own depth along the direction that depth was measured, the
|
|
58
|
+
* very floor the engine classified it against (`depthFloor` /
|
|
59
|
+
* `estimateFloor`, one definition in the clash-math source). The band is
|
|
60
|
+
* that floor, floored at {@link TOUCHING_EPSILON}, so whether a reported
|
|
61
|
+
* clash counts as touching is decided by the same rule as its `hard` verdict
|
|
62
|
+
* and does not move when the model is translated orthogonally to the depth
|
|
63
|
+
* (#5639). A `hard` clash's depth always exceeds its own floor, so for engine
|
|
64
|
+
* results this is the fixed {@link TOUCHING_EPSILON} band in practice; the
|
|
65
|
+
* floor is kept in the comparison so the band can never be narrower than
|
|
66
|
+
* what the engine itself cannot resolve.
|
|
69
67
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
68
|
+
* FALLBACK, deliberately unchanged: a clash without `depthFloor` (recorded
|
|
69
|
+
* before the field existed, rehydrated from BCF/JSON without it, or built by
|
|
70
|
+
* hand) keeps the old band — the max absolute coordinate of its `bounds`
|
|
71
|
+
* over all three axes times 2^-22, floored at {@link TOUCHING_EPSILON}. That
|
|
72
|
+
* band is origin-dependent (a model 10 km out in X gives a Z-direction
|
|
73
|
+
* contact ~2.4 mm of slack), which is exactly why engine results no longer
|
|
74
|
+
* use it; it stays for those results only because nothing better can be
|
|
75
|
+
* derived from a bare `Clash`.
|
|
77
76
|
*/
|
|
78
77
|
function touchingEpsilonFor(c) {
|
|
78
|
+
if (c.depthFloor !== undefined)
|
|
79
|
+
return Math.max(TOUCHING_EPSILON, c.depthFloor);
|
|
79
80
|
let extent = 0;
|
|
80
81
|
for (const v of [c.bounds.min, c.bounds.max]) {
|
|
81
82
|
for (const coord of v) {
|
|
@@ -93,9 +94,9 @@ function touchingEpsilonFor(c) {
|
|
|
93
94
|
* slab, a column sitting on a footing) reported with a ~0 m depth, which users
|
|
94
95
|
* reasonably distrust when they appear in the clash list.
|
|
95
96
|
*
|
|
96
|
-
* `eps` defaults to {@link touchingEpsilonFor}
|
|
97
|
-
*
|
|
98
|
-
*
|
|
97
|
+
* `eps` defaults to {@link touchingEpsilonFor}: the clash's own depth floor
|
|
98
|
+
* when the engine recorded one, else the older coordinate-magnitude band (see
|
|
99
|
+
* that function). An explicit `eps` overrides the default entirely.
|
|
99
100
|
*/
|
|
100
101
|
export function isTouching(c, eps = touchingEpsilonFor(c)) {
|
|
101
102
|
return c.status === 'touch' || (c.status === 'hard' && penetrationDepth(c) <= eps);
|
package/dist/analysis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.js","sourceRoot":"","sources":["../src/analysis.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAe/D;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAyB;IACxD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,MAAM,UAAU,GAAkC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC/F,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/C,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACnE,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,aAAa,GAAkC;IAC1D,QAAQ,EA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,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM;IACV,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { triangleAt, triangleCount } from "./triangle.js";
|
|
|
9
9
|
* value with magnitude in `[2, 4)` the true float32 ULP is `2^-22`, and for
|
|
10
10
|
* larger magnitudes the ULP only grows. Same `2^-22` term (and reasoning) as
|
|
11
11
|
* `near_band_from_extent` in `rust/geometry/src/kernel/near_band.rs` and
|
|
12
|
-
* `
|
|
12
|
+
* the clash-math `depthFloor` (`math/aabb.ts`) — kept local rather than shared
|
|
13
13
|
* because plane-distance tolerance and penetration-depth tolerance are
|
|
14
14
|
* different jobs, even though both derive from the same f32 ingestion floor.
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broad.d.ts","sourceRoot":"","sources":["../../src/engine-ts/broad.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EAAE,EACtB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAC7B,MAAM,EAAE,MAAM,GACb,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"broad.d.ts","sourceRoot":"","sources":["../../src/engine-ts/broad.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EAAE,EACtB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAC7B,MAAM,EAAE,MAAM,GACb,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA6CzB"}
|
package/dist/engine-ts/broad.js
CHANGED
|
@@ -18,7 +18,17 @@ export function candidatePairs(groupA, groupB, margin) {
|
|
|
18
18
|
const bvh = BVH.build(items);
|
|
19
19
|
const pairs = [];
|
|
20
20
|
if (groupB) {
|
|
21
|
-
|
|
21
|
+
// No entity-identity dedup here. Deduping candidate PAIRS by
|
|
22
|
+
// (a.model, a.key, b.model, b.key) before the narrow phase ran used to
|
|
23
|
+
// collapse every sub-prim of a split entity onto whichever one the BVH
|
|
24
|
+
// reached first — so a broad-phase false positive submesh could claim
|
|
25
|
+
// the (A, B) slot and hide a sibling submesh that genuinely clashes
|
|
26
|
+
// (#5194). Every candidate the broad phase finds is now tested; entity
|
|
27
|
+
// identity is deduped once, downstream, AFTER the narrow phase has
|
|
28
|
+
// decided each submesh's verdict, keeping the more severe one — see
|
|
29
|
+
// `mostSevere` in `orchestrator.ts`, which already deduped by the same
|
|
30
|
+
// (model, key) identity via `clashId` for an unrelated reason and is the
|
|
31
|
+
// single place both kernels' records converge.
|
|
22
32
|
for (let j = 0; j < groupB.length; j += 1) {
|
|
23
33
|
const b = groupB[j];
|
|
24
34
|
const hits = bvh.queryAABB(inflate(b.bounds, margin));
|
|
@@ -26,10 +36,6 @@ export function candidatePairs(groupA, groupB, margin) {
|
|
|
26
36
|
const a = groupA[i];
|
|
27
37
|
if (isSameEntity(a, b))
|
|
28
38
|
continue;
|
|
29
|
-
const dedup = orderKey(a.model, a.key, b.model, b.key);
|
|
30
|
-
if (seen.has(dedup))
|
|
31
|
-
continue;
|
|
32
|
-
seen.add(dedup);
|
|
33
39
|
pairs.push([i, j]);
|
|
34
40
|
}
|
|
35
41
|
}
|
|
@@ -71,9 +77,4 @@ function isSameEntity(a, b) {
|
|
|
71
77
|
return false;
|
|
72
78
|
return a.key === b.key || a.ref === b.ref;
|
|
73
79
|
}
|
|
74
|
-
function orderKey(modelA, keyA, modelB, keyB) {
|
|
75
|
-
const a = `${modelA} ${keyA}`;
|
|
76
|
-
const b = `${modelB} ${keyB}`;
|
|
77
|
-
return a < b ? `${a} ${b}` : `${b} ${a}`;
|
|
78
|
-
}
|
|
79
80
|
//# sourceMappingURL=broad.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broad.js","sourceRoot":"","sources":["../../src/engine-ts/broad.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,GAAG,EAAuB,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAsB,EACtB,MAA6B,EAC7B,MAAc;IAEd,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,KAAK,GAAqB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3F,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,KAAK,GAA4B,EAAE,CAAC;IAE1C,IAAI,MAAM,EAAE,CAAC;QACX,
|
|
1
|
+
{"version":3,"file":"broad.js","sourceRoot":"","sources":["../../src/engine-ts/broad.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,GAAG,EAAuB,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAsB,EACtB,MAA6B,EAC7B,MAAc;IAEd,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,KAAK,GAAqB,MAAM,CAAC,GAAG,C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EAAE,MAAM,CAAC,CAAC,CAAC;YACtD,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;gBACrB,IAAI,CAAC,IAAI,CAAC;oBAAE,SAAS;gBACrB,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,mEAAmE;gBACnE,qEAAqE;gBACrE,2DAA2D;gBAC3D,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;oBAAE,SAAS;gBACrC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,YAAY,CAAC,CAA8C,EAAE,CAA8C;IAClH,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACtC,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC;AAC5C,CAAC"}
|
|
@@ -29,19 +29,79 @@ import type { NarrowResult } from './narrow.js';
|
|
|
29
29
|
export interface BoxPenetration {
|
|
30
30
|
/** Exact box-box minimum-translation depth (Gottschalk 15-axis SAT). */
|
|
31
31
|
mtd: number;
|
|
32
|
+
/** The unit axis `mtd` was measured along (its precision floor's
|
|
33
|
+
* direction, #5405). */
|
|
34
|
+
axis: Vec3;
|
|
32
35
|
/** The MTD is inflated by the piercing member's own extent; report the
|
|
33
36
|
* AABB estimate instead (see `isThroughPenetration`). */
|
|
34
37
|
through: boolean;
|
|
35
38
|
}
|
|
36
39
|
export declare function boxPenetration(small: TriMesh, large: TriMesh): BoxPenetration | null;
|
|
40
|
+
/**
|
|
41
|
+
* Distance from `p` to `mesh`'s surface, and whether `p` is CLEAR of that
|
|
42
|
+
* surface: farther from it than the pair's depth floor along the direction
|
|
43
|
+
* from the nearest surface point to `p` (#5751).
|
|
44
|
+
*
|
|
45
|
+
* A ray-parity (`containsPoint`) verdict is trustworthy only for a clear
|
|
46
|
+
* point. For a point on the surface — which is exactly where a probe lands
|
|
47
|
+
* for a flush pair — parity is a coin flip decided by f32 rounding, and any
|
|
48
|
+
* rigid translation re-rolls it. The threshold is the classification floor
|
|
49
|
+
* itself (`depthFloor`, #5591): a point within it of a surface is within f32
|
|
50
|
+
* noise of being on it, so it is evidence of contact, not of volume. One rule
|
|
51
|
+
* for every probe that asks "is this point clearly inside". Bit-identical to
|
|
52
|
+
* the Rust `surface_clearance`.
|
|
53
|
+
*/
|
|
54
|
+
export declare function surfaceClearance(mesh: TriMesh, p: Vec3, a: AABB, b: AABB): [number, boolean];
|
|
55
|
+
/** `p` is inside `mesh`'s solid AND clear of its surface (see
|
|
56
|
+
* {@link surfaceClearance}). Parity first: it is the cheaper query. */
|
|
57
|
+
export declare function clearlyInside(mesh: TriMesh, p: Vec3, a: AABB, b: AABB): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether `inner` — AABB-contained in `outer`, with no triangle pair crossing
|
|
60
|
+
* beyond f32 noise — is buried in `outer`'s solid (#5473).
|
|
61
|
+
*
|
|
62
|
+
* With no crossing, each connected shell of `inner` lies entirely on one side
|
|
63
|
+
* of `outer`'s surface up to touching it, so one probe point per shell decides
|
|
64
|
+
* by ray parity — provided the probe is not itself on `outer`'s surface, where
|
|
65
|
+
* parity is a coin flip decided by f32 rounding. The old probe, `inner`'s
|
|
66
|
+
* first vertex, is exactly that point for a flush pair (an element resting
|
|
67
|
+
* against the inside of another's AABB touches it AT its vertices), so a rigid
|
|
68
|
+
* translation re-rolled the verdict.
|
|
69
|
+
*
|
|
70
|
+
* Candidates are `inner`'s vertex centroid (when that lies inside `inner`) and
|
|
71
|
+
* every vertex; a candidate is CLEAR of `outer`'s surface by
|
|
72
|
+
* {@link surfaceClearance} (the pair's depth floor along its own direction,
|
|
73
|
+
* the same rule as the AABB-penetration probe, #5751).
|
|
74
|
+
* 1. Any clear candidate inside `outer` means its shell is buried: `true`.
|
|
75
|
+
* Every candidate is checked, because `inner` may be several disconnected
|
|
76
|
+
* shells and only one of them need be buried (review of #5564); an outside
|
|
77
|
+
* shell must not end the search.
|
|
78
|
+
* 2. Otherwise any clear candidate is outside, and no shell is clearly
|
|
79
|
+
* buried: `false`.
|
|
80
|
+
* 3. With no clear candidate at all — every vertex on `outer`'s surface — the
|
|
81
|
+
* one farthest from it decides. That is what separates an element exactly
|
|
82
|
+
* filling a notch (its centroid is outside) from a duplicate of part of
|
|
83
|
+
* `outer` (its centroid is inside).
|
|
84
|
+
*
|
|
85
|
+
* `a` / `b` are the pair's element AABBs (in either order: the floor is
|
|
86
|
+
* symmetric). Visit order and strict comparisons keep the pick bit-identical
|
|
87
|
+
* to the Rust `contained_solid_is_buried`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function containedSolidIsBuried(inner: TriMesh, outer: TriMesh, a: AABB, b: AABB): boolean;
|
|
90
|
+
/** A crossing vertex's penetration into the other solid, with the unit
|
|
91
|
+
* direction it was measured along (from the other's surface to the vertex),
|
|
92
|
+
* which is what its precision floor is projected onto (#5405). */
|
|
93
|
+
export interface VertexPenetration {
|
|
94
|
+
depth: number;
|
|
95
|
+
axis: Vec3;
|
|
96
|
+
}
|
|
37
97
|
/**
|
|
38
98
|
* Deepest penetration of `mesh`'s crossing-triangle VERTICES into `other`:
|
|
39
|
-
* the
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
99
|
+
* the vertex of the triangles flagged in `crossFlags` (the pairs the narrow
|
|
100
|
+
* phase saw genuinely crossing `other`) that lies inside `other` farthest
|
|
101
|
+
* from its surface. Each vertex is visited once (deduped by vertex index, in
|
|
102
|
+
* index order, strict `>` — bit-identical to the Rust
|
|
103
|
+
* `crossing_vertex_penetration`). `null` when no flagged vertex is strictly
|
|
104
|
+
* inside.
|
|
45
105
|
*
|
|
46
106
|
* This is NOT a depth metric and must never be reported as one — it is the
|
|
47
107
|
* sampling probe PR #2536 was held over (`maxPenetrationInto`): its value is
|
|
@@ -56,7 +116,7 @@ export declare function boxPenetration(small: TriMesh, large: TriMesh): BoxPenet
|
|
|
56
116
|
* underestimating can only keep a pair BELOW the floor, and the floor is
|
|
57
117
|
* the very thing being tested.
|
|
58
118
|
*/
|
|
59
|
-
export declare function crossingVertexPenetration(mesh: TriMesh, other: TriMesh, crossFlags: Uint8Array):
|
|
119
|
+
export declare function crossingVertexPenetration(mesh: TriMesh, other: TriMesh, crossFlags: Uint8Array): VertexPenetration | null;
|
|
60
120
|
/**
|
|
61
121
|
* Turns the candidate penetration depths into the final `(status,
|
|
62
122
|
* distanceKind, distance)` triple. This is the ONLY place in the narrow
|
|
@@ -77,10 +137,22 @@ export declare function crossingVertexPenetration(mesh: TriMesh, other: TriMesh,
|
|
|
77
137
|
* - the box MTD, when both elements are certified boxes (`box`);
|
|
78
138
|
* - the crossing-vertex penetration, for a CONTAINED pair with a crossing
|
|
79
139
|
* vertex inside the other solid (`meshEvidence`) — evidence for this gate
|
|
80
|
-
* only, never a reported depth (see `crossingVertexPenetration`)
|
|
140
|
+
* only, never a reported depth (see `crossingVertexPenetration`), and
|
|
141
|
+
* only where the reported depth would be the ESTIMATE (#5717).
|
|
142
|
+
*
|
|
143
|
+
* Each candidate is tested against the floor OF ITS OWN DIRECTION — the
|
|
144
|
+
* pair's per-axis f32 noise projected onto the direction that candidate was
|
|
145
|
+
* measured along (`depthFloor`, `estimateFloor`; #5405). A single floor from
|
|
146
|
+
* the max coordinate over all axes handed a Z-direction depth the noise of
|
|
147
|
+
* an X coordinate 10 km out: a genuine 2 mm overlap read as `touch` there and
|
|
148
|
+
* `hard` at the origin, and near the origin the X extent pinned the threshold
|
|
149
|
+
* for contacts that have no X component at all.
|
|
81
150
|
*
|
|
82
|
-
* The pair is `hard` only when
|
|
83
|
-
* floor
|
|
151
|
+
* The pair is `hard` only when every candidate that BEARS ON THE REPORTED
|
|
152
|
+
* NUMBER clears its floor — all three when the report is the estimate, and
|
|
153
|
+
* the estimate and the MTD when the box path certified a depth, since a
|
|
154
|
+
* sampling probe may not overrule an exact one (#5717).
|
|
155
|
+
* That is what makes the floor unreachable by depth-source selection:
|
|
84
156
|
* a sub-floor box MTD cannot be promoted by the through-penetration guard
|
|
85
157
|
* swapping in a larger AABB estimate; a sub-floor crossing-vertex
|
|
86
158
|
* penetration on a contained pair (surfaces authored flush — the eight
|
|
@@ -95,5 +167,5 @@ export declare function crossingVertexPenetration(mesh: TriMesh, other: TriMesh,
|
|
|
95
167
|
* distance clears the floor by construction, whichever quantity it came
|
|
96
168
|
* from.
|
|
97
169
|
*/
|
|
98
|
-
export declare function depthClashResult(box: BoxPenetration | null, estimate: number, meshEvidence:
|
|
170
|
+
export declare function depthClashResult(box: BoxPenetration | null, estimate: number, meshEvidence: VertexPenetration | null, elA: ClashElement, elB: ClashElement, rule: ClashRule, point: Vec3, bounds: AABB): NarrowResult | null;
|
|
99
171
|
//# sourceMappingURL=depth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../src/engine-ts/depth.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../src/engine-ts/depth.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CA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