Find duplicate / fully-overlapping elements. Returns a ClashResult
where each clash is a near-coincident pair. settings.tolerance is
positionTolerance, the value that actually decided the matches.
Severity says exactly this much:
major — some pair of the two elements' boxes coincides within
exactToleranceand the two elements' meshes — summed over the
several parts a multi-material / CSG element emits — agree to within 5% on
both surface area and enclosed volume. Read it as "the same object, in the
same place"; it survives one copy being re-tessellated, and it does not
depend on which of a multi-part element's part pairings the sweep visited
first.
minor — near-coincident, but something differs: the boxes are further
apart than exactTolerance, the shapes disagree, or one element carries no
measurable geometry.
What major still cannot tell you: the signature is two scalars over the
surface, so two genuinely different solids that happen to agree in both area
and volume to within 5% are indistinguishable here, as are an element and its
mirror image.
The nested-solids limit
Matching remains AABB-only, so an element nested inside another — a pipe in a
sleeve, a duct in a shaft, an assembly and the envelope drawn round it — is,
in principle, something this pass cannot tell from a duplicate. Two gates
already narrow that to a documented residual, and duplicates.test.ts pins
each case:
Nesting has clearance, and boxDistance measures clearance. Anything
looser than ~7 mm of annulus is more than positionTolerance away and is
never reported at all: a DN100 pipe in a DN125 sleeve is 17.7 mm away, a
400×300 duct in a 500×400 shaft is 70.7 mm.
Tighter nesting is reported, but only ever as minor. Reaching major
additionally requires the two meshes to agree on surface area and enclosed
volume within 5%, which distinct solids sharing a box do not: a 50 mm and a
55 mm tube are 9.1% / 17.4% apart, a railing and its envelope box 73.2% /
88.4%.
So the residual is exactly this: a pair nested within a few millimetres is
listed as a minor candidate overlap. That is the intended reading of
minor — "these two coincide, and this pass will not claim they are the same
object" — and a reviewer still sees it, which for a coincidence hunt is the
safe direction.
Measured across five public models (duplex, AC20-FZK-Haus, Office_A_20110811,
dental_clinic, Infra-Bridge), no reported pair was a nested one: all 33
findings are same-type pairs of equal bounds, and the count of nested or
cross-type pairs stays 0 even at a 250 mm tolerance, 25× the default. Note
what that does not cover — none of the five carries pipe or duct segments, so
the pipe-in-sleeve case is evidenced only by the constructed fixtures above.
Closing the residual would need a narrow phase, which this pass deliberately
does not run, and the cheap substitutes are worse rather than merely weaker.
An area-weighted centroid plus surface inertia — the obvious candidate, and
the same O(triangles) cost as the signature (3.6 ms vs 2.6 ms over
dental_clinic's 236,795 triangles) — discriminates less on every nested
case measured, contributes nothing at all when the nesting is concentric
(identical centroids for pipe-in-sleeve and pipe-plus-insulation), and is not
tessellation-invariant: it reads 39.6% apart on one box against a finer
triangulation of the same box, which would break the exact-duplicate case
this signature exists to keep together. A voxel occupancy sample would
separate nested from coincident, but it needs a cell size — reintroducing the
scale-dependent knob that replacing the IoU gate removed.
Find duplicate / fully-overlapping elements. Returns a ClashResult where each clash is a near-coincident pair.
settings.toleranceispositionTolerance, the value that actually decided the matches.Severity says exactly this much:
major— some pair of the two elements' boxes coincides withinexactToleranceand the two elements' meshes — summed over the several parts a multi-material / CSG element emits — agree to within 5% on both surface area and enclosed volume. Read it as "the same object, in the same place"; it survives one copy being re-tessellated, and it does not depend on which of a multi-part element's part pairings the sweep visited first.minor— near-coincident, but something differs: the boxes are further apart thanexactTolerance, the shapes disagree, or one element carries no measurable geometry.What
majorstill cannot tell you: the signature is two scalars over the surface, so two genuinely different solids that happen to agree in both area and volume to within 5% are indistinguishable here, as are an element and its mirror image.The nested-solids limit
Matching remains AABB-only, so an element nested inside another — a pipe in a sleeve, a duct in a shaft, an assembly and the envelope drawn round it — is, in principle, something this pass cannot tell from a duplicate. Two gates already narrow that to a documented residual, and
duplicates.test.tspins each case:positionToleranceaway and is never reported at all: a DN100 pipe in a DN125 sleeve is 17.7 mm away, a 400×300 duct in a 500×400 shaft is 70.7 mm.minor. Reachingmajoradditionally requires the two meshes to agree on surface area and enclosed volume within 5%, which distinct solids sharing a box do not: a 50 mm and a 55 mm tube are 9.1% / 17.4% apart, a railing and its envelope box 73.2% / 88.4%.So the residual is exactly this: a pair nested within a few millimetres is listed as a
minorcandidate overlap. That is the intended reading ofminor— "these two coincide, and this pass will not claim they are the same object" — and a reviewer still sees it, which for a coincidence hunt is the safe direction.Measured across five public models (duplex, AC20-FZK-Haus, Office_A_20110811, dental_clinic, Infra-Bridge), no reported pair was a nested one: all 33 findings are same-type pairs of equal bounds, and the count of nested or cross-type pairs stays 0 even at a 250 mm tolerance, 25× the default. Note what that does not cover — none of the five carries pipe or duct segments, so the pipe-in-sleeve case is evidenced only by the constructed fixtures above.
Closing the residual would need a narrow phase, which this pass deliberately does not run, and the cheap substitutes are worse rather than merely weaker. An area-weighted centroid plus surface inertia — the obvious candidate, and the same O(triangles) cost as the signature (3.6 ms vs 2.6 ms over dental_clinic's 236,795 triangles) — discriminates less on every nested case measured, contributes nothing at all when the nesting is concentric (identical centroids for pipe-in-sleeve and pipe-plus-insulation), and is not tessellation-invariant: it reads 39.6% apart on one box against a finer triangulation of the same box, which would break the exact-duplicate case this signature exists to keep together. A voxel occupancy sample would separate nested from coincident, but it needs a cell size — reintroducing the scale-dependent knob that replacing the IoU gate removed.