@ifc-lite/clash 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,8 +20,8 @@ import type { NarrowResult } from './narrow.js';
|
|
|
20
20
|
* member's own extent along the shared axis, not by the material actually
|
|
21
21
|
* crossed (review: #2536, reproduced a 5.5x inflation on exactly this
|
|
22
22
|
* shape), so `depthClashResult` reports the caller's AABB estimate for that
|
|
23
|
-
* shape — matching what `main` did before the
|
|
24
|
-
* honest about not being a measurement. The MTD is still returned (not
|
|
23
|
+
* shape, capped by the MTD (#5742) — matching what `main` did before the
|
|
24
|
+
* box-exact metric existed, and honest about not being a measurement. The MTD is still returned (not
|
|
25
25
|
* discarded here) because the f32 floor must see it: which number gets
|
|
26
26
|
* REPORTED is a separate, later decision from whether the pair is
|
|
27
27
|
* measurable at all (see `depthClashResult`).
|
|
@@ -33,7 +33,8 @@ export interface BoxPenetration {
|
|
|
33
33
|
* direction, #5405). */
|
|
34
34
|
axis: Vec3;
|
|
35
35
|
/** The MTD is inflated by the piercing member's own extent; report the
|
|
36
|
-
* AABB estimate instead (see `isThroughPenetration`
|
|
36
|
+
* AABB estimate instead, capped by the MTD (see `isThroughPenetration`
|
|
37
|
+
* and `depthClashResult`, #5742). */
|
|
37
38
|
through: boolean;
|
|
38
39
|
}
|
|
39
40
|
export declare function boxPenetration(small: TriMesh, large: TriMesh): BoxPenetration | null;
|
|
@@ -138,7 +139,7 @@ export declare function crossingVertexPenetration(mesh: TriMesh, other: TriMesh,
|
|
|
138
139
|
* - the crossing-vertex penetration, for a CONTAINED pair with a crossing
|
|
139
140
|
* vertex inside the other solid (`meshEvidence`) — evidence for this gate
|
|
140
141
|
* only, never a reported depth (see `crossingVertexPenetration`), and
|
|
141
|
-
* only where the reported depth
|
|
142
|
+
* only where the reported depth is labelled `estimate` (#5717; that includes a through-pair capped by its MTD, #5742).
|
|
142
143
|
*
|
|
143
144
|
* Each candidate is tested against the floor OF ITS OWN DIRECTION — the
|
|
144
145
|
* pair's per-axis f32 noise projected onto the direction that candidate was
|
|
@@ -149,7 +150,7 @@ export declare function crossingVertexPenetration(mesh: TriMesh, other: TriMesh,
|
|
|
149
150
|
* for contacts that have no X component at all.
|
|
150
151
|
*
|
|
151
152
|
* The pair is `hard` only when every candidate that BEARS ON THE REPORTED
|
|
152
|
-
* NUMBER clears its floor — all three when the report is
|
|
153
|
+
* NUMBER clears its floor — all three when the report is labelled `estimate`, and
|
|
153
154
|
* the estimate and the MTD when the box path certified a depth, since a
|
|
154
155
|
* sampling probe may not overrule an exact one (#5717).
|
|
155
156
|
* That is what makes the floor unreachable by depth-source selection:
|
|
@@ -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;AAIhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAC;IACZ;4BACwB;IACxB,IAAI,EAAE,IAAI,CAAC;IACX;
|
|
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;AAIhD;;;;;;;;;;;;;;;;;;GAkB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iB,GAAG,IAAI,EACtC,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,GACX,YAAY,GAAG,IAAI,CAkErB"}
|
package/dist/engine-ts/depth.js
CHANGED
|
@@ -159,7 +159,7 @@ export function crossingVertexPenetration(mesh, other, crossFlags) {
|
|
|
159
159
|
* - the crossing-vertex penetration, for a CONTAINED pair with a crossing
|
|
160
160
|
* vertex inside the other solid (`meshEvidence`) — evidence for this gate
|
|
161
161
|
* only, never a reported depth (see `crossingVertexPenetration`), and
|
|
162
|
-
* only where the reported depth
|
|
162
|
+
* only where the reported depth is labelled `estimate` (#5717; that includes a through-pair capped by its MTD, #5742).
|
|
163
163
|
*
|
|
164
164
|
* Each candidate is tested against the floor OF ITS OWN DIRECTION — the
|
|
165
165
|
* pair's per-axis f32 noise projected onto the direction that candidate was
|
|
@@ -170,7 +170,7 @@ export function crossingVertexPenetration(mesh, other, crossFlags) {
|
|
|
170
170
|
* for contacts that have no X component at all.
|
|
171
171
|
*
|
|
172
172
|
* The pair is `hard` only when every candidate that BEARS ON THE REPORTED
|
|
173
|
-
* NUMBER clears its floor — all three when the report is
|
|
173
|
+
* NUMBER clears its floor — all three when the report is labelled `estimate`, and
|
|
174
174
|
* the estimate and the MTD when the box path certified a depth, since a
|
|
175
175
|
* sampling probe may not overrule an exact one (#5717).
|
|
176
176
|
* That is what makes the floor unreachable by depth-source selection:
|
|
@@ -193,8 +193,9 @@ export function depthClashResult(box, estimate, meshEvidence, elA, elB, rule, po
|
|
|
193
193
|
// candidate never counts as below its floor, on either side.
|
|
194
194
|
const estFloor = estimateFloor(elA.bounds, elB.bounds);
|
|
195
195
|
const boxFloor = box != null ? depthFloor(box.axis, elA.bounds, elB.bounds) : null;
|
|
196
|
-
// Whether the pair has a CERTIFIED depth
|
|
197
|
-
//
|
|
196
|
+
// Whether the pair has a CERTIFIED depth (the box MTD, labelled `mesh`).
|
|
197
|
+
// A through-pair capped by its MTD (below) is NOT certified: it is labelled
|
|
198
|
+
// `estimate`, so the mesh-evidence guard still applies to it. Hoisted
|
|
198
199
|
// above the floor test because the mesh-evidence term needs it too.
|
|
199
200
|
const measured = box != null && !box.through;
|
|
200
201
|
const belowFloor = estimate <= estFloor ||
|
|
@@ -224,16 +225,35 @@ export function depthClashResult(box, estimate, meshEvidence, elA, elB, rule, po
|
|
|
224
225
|
}
|
|
225
226
|
// Estimate-vs-mesh selection, reachable only above the floor: the box MTD
|
|
226
227
|
// is certified (`mesh`) unless the pair is a through-penetration, where
|
|
227
|
-
// the AABB estimate is the honest number (see `boxPenetration`)
|
|
228
|
-
//
|
|
229
|
-
//
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
228
|
+
// the AABB estimate is the honest number (see `boxPenetration`) -- CAPPED
|
|
229
|
+
// by the MTD (#5742). The MTD is a translation proven to separate the
|
|
230
|
+
// pair, so a reported depth above it over-reports by construction; for
|
|
231
|
+
// rotated boxes the AABB estimate routinely does (it is inflated by the
|
|
232
|
+
// rotation). At the through/partial boundary, which f32 noise decides per
|
|
233
|
+
// placement, the partial side reports the MTD; with the cap, a through side
|
|
234
|
+
// whose estimate EXCEEDS the MTD reports it too, instead of swinging to an
|
|
235
|
+
// estimate 30x larger (#5742). A through side whose estimate is SMALLER (a
|
|
236
|
+
// thin rod through a thick wall: the estimate is the rod's width) still
|
|
237
|
+
// reports the estimate, the #2536 contract, so that tie is not continuous;
|
|
238
|
+
// the cap only removes the over-report. The label stays `estimate`: through
|
|
239
|
+
// a through-penetration the MTD bounds the depth, it does not measure the
|
|
240
|
+
// material crossed. The reported depth carries ITS OWN floor out with it
|
|
241
|
+
// (#5639), so the reported touching band is decided by the same rule as
|
|
242
|
+
// this verdict. Same selection, in the same order, as the Rust kernel.
|
|
243
|
+
let depth = estimate;
|
|
244
|
+
let distanceKind = 'estimate';
|
|
245
|
+
let floor = estFloor;
|
|
246
|
+
if (box != null && boxFloor != null) {
|
|
247
|
+
if (!box.through) {
|
|
248
|
+
depth = box.mtd;
|
|
249
|
+
distanceKind = 'mesh';
|
|
250
|
+
floor = boxFloor;
|
|
251
|
+
}
|
|
252
|
+
else if (box.mtd < estimate) {
|
|
253
|
+
depth = box.mtd;
|
|
254
|
+
floor = boxFloor;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return { status: 'hard', distance: -depth, distanceKind, point, bounds, depthFloor: floor };
|
|
238
258
|
}
|
|
239
259
|
//# sourceMappingURL=depth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth.js","sourceRoot":"","sources":["../../src/engine-ts/depth.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAY/D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"depth.js","sourceRoot":"","sources":["../../src/engine-ts/depth.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAY/D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiC5D,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,KAAc;IAC3D,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,GAAG,GAAG,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACnC,IAAI,GAAG,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAC7B,OAAO,EAA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AK,EAAE,MAAM,EAAE,CAAC;IAC/E,CAAC;IACD,0EAA0E;IAC1E,wEAAwE;IACxE,0EAA0E;IAC1E,sEAAsE;IACtE,uEAAuE;IACvE,wEAAwE;IACxE,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,2EAA2E;IAC3E,wEAAwE;IACxE,2EAA2E;IAC3E,4EAA4E;IAC5E,0EAA0E;IAC1E,yEAAyE;IACzE,wEAAwE;IACxE,uEAAuE;IACvE,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,YAAY,GAAwB,UAAU,CAAC;IACnD,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,GAAG,IAAI,IAAI,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACpC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC;YAChB,YAAY,GAAG,MAAM,CAAC;YACtB,KAAK,GAAG,QAAQ,CAAC;QACnB,CAAC;aAAM,IAAI,GAAG,CAAC,GAAG,GAAG,QAAQ,EAAE,CAAC;YAC9B,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC;YAChB,KAAK,GAAG,QAAQ,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;AAC9F,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -135,8 +135,9 @@ export interface ClashSettings {
|
|
|
135
135
|
* earlier "deepest crossing-triangle vertex" probe that was a sampling
|
|
136
136
|
* artifact, converging to 0 as a mesh was retessellated instead of to the
|
|
137
137
|
* true depth (PR #2536).
|
|
138
|
-
* - `'estimate'` —
|
|
139
|
-
*
|
|
138
|
+
* - `'estimate'` — an uncertified depth: the smallest overlapping dimension of
|
|
139
|
+
* the two element AABBs, or for a box through-penetration that value capped
|
|
140
|
+
* by the box-box minimum translation distance (see below). Reported for a hard clash whenever the narrow phase could not
|
|
140
141
|
* certify a box-box depth. That happens in four shapes, all common in real
|
|
141
142
|
* models: either element is not (confirmed) a box; surfaces that only
|
|
142
143
|
* coincide (stacked layers sharing a footprint); one solid modelled wholly
|
|
@@ -147,7 +148,9 @@ export interface ClashSettings {
|
|
|
147
148
|
* `'mesh'` for exactly that reason. The value is then a property of the two
|
|
148
149
|
* BOXES, not of the solids — it can equal an element's own thickness rather
|
|
149
150
|
* than how far the two actually interpenetrate. Treat it as an indication of
|
|
150
|
-
* scale, not as a measurement.
|
|
151
|
+
* scale, not as a measurement. For a through-penetration between two boxes
|
|
152
|
+
* it never exceeds the box-box minimum translation distance, a distance
|
|
153
|
+
* proven to separate them (#5742).
|
|
151
154
|
*/
|
|
152
155
|
export type ClashDistanceKind = 'mesh' | 'estimate';
|
|
153
156
|
export interface Clash {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,YAAY,EAAE,IAAI,EAAE,CAAC;AAErB,wCAAwC;AACxC,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE5C,gDAAgD;AAChD,MAAM,MAAM,IAAI,GAAG,SAAS,MAAM,EAAE,CAAC;AAErC;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;AAE7C,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpE;;;;;;;;;GASG;AACH,MAAM,WAAW,Y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;;;;OAOG;IACH,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,QAAQ,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,OAAO,CAAA;KAAE,CAAC;CAChE;AAED,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC;IACb,mBAAmB,EAAE,IAAI,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA2N/D,sEAAsE;AACtE,MAAM,CAAC,MAAM,qBAAqB,GAAiC,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAEpG,iEAAiE;AACjE,MAAM,CAAC,MAAM,2BAA2B,GAAsB,MAAM,CAAC;AA6GrE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS,EAAE,KAAK;IAChB,oBAAoB,EAAE,IAAI;CAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/clash",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Clash detection for IFC-Lite — representation-agnostic core engine + source adapters",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ifc-lite/bcf": "^5.0.0",
|
|
37
|
-
"@ifc-lite/encoding": "^2.
|
|
38
|
-
"@ifc-lite/geometry": "^7.
|
|
39
|
-
"@ifc-lite/
|
|
40
|
-
"@ifc-lite/
|
|
37
|
+
"@ifc-lite/encoding": "^2.3.0",
|
|
38
|
+
"@ifc-lite/geometry": "^7.6.0",
|
|
39
|
+
"@ifc-lite/ifcx": "^4.3.0",
|
|
40
|
+
"@ifc-lite/parser": "^9.1.0",
|
|
41
|
+
"@ifc-lite/query": "^2.5.2",
|
|
41
42
|
"@ifc-lite/spatial": "^1.15.0",
|
|
42
|
-
"@ifc-lite/wasm": "^10.
|
|
43
|
-
"@ifc-lite/query": "^2.5.1"
|
|
43
|
+
"@ifc-lite/wasm": "^10.2.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
|
-
"vitest": "^5.0.
|
|
48
|
-
"@ifc-lite/export": "^4.
|
|
47
|
+
"vitest": "^5.0.2",
|
|
48
|
+
"@ifc-lite/export": "^4.8.0",
|
|
49
49
|
"@ifc-lite/world-frame-fixtures": "^0.1.4"
|
|
50
50
|
},
|
|
51
51
|
"license": "MPL-2.0",
|