mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
468104b1b5
The manifold clash intersection test (test_intersection in IfcGeomTree.h) witnesses overlap by the penetration depth of each triangle vertex into the other solid, plus edge piercing. For two perfectly centered walls that share their y and z extents and overlap only in x, the penetrating end-cap corner vertices land exactly on the other wall's coincident side faces, so every witness vertex has zero depth and the piercing edges are coplanar with the shared faces. The real overlap is only witnessed at a point strictly interior to B, which nothing sampled, so the clash was missed (nudging either solid off-axis restored detection). Sample the triangle centroid as an extra protrusion witness. For a face-coincident overlap the centroid is strictly interior and yields a depth above tolerance; for merely touching or abutting geometry the centroid stays on the shared surface (depth ~0) and is still discarded by the existing strict "> tolerance" gate, so no false positives are added. Verified on OCC 7.9.2 (python clash tree): the perfectly aligned 50mm overlap goes from 0 to 1 clash, while an off-axis nudge (still 1), an abutting shared-face pair (0) and a 50mm gap (0) are unchanged. On real models a corner-abutting 5 wall building stays 0 and a 614 element facade stays 169 clashes, identical before and after. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>