Auto-fix for GEOMETRY_DUPLICATE_VERTICES — coalesces vertex
slots that are byte-identical across every populated attribute
(positions, normals, UVs) and remaps indices / edgeIndices
to point at the canonical slot.
Vertex splitting for genuine seams / crease edges produces
different normals or UVs on the same position, so those slots
fingerprint differently and stay separate. Only truly redundant
slots — same position, same normal, same UV — coalesce.
Compacted arrays are sized to the canonical-slot count, so this
fix also implicitly subsumes compactUnusedVertices
for any vertices that became unused as a side-effect.
Idempotent: returns {fixed: false} when every vertex slot is
already unique under the (positions + normals + UVs) key.
Auto-fix for
GEOMETRY_DUPLICATE_VERTICES— coalesces vertex slots that are byte-identical across every populated attribute (positions, normals, UVs) and remapsindices/edgeIndicesto point at the canonical slot.Vertex splitting for genuine seams / crease edges produces different normals or UVs on the same position, so those slots fingerprint differently and stay separate. Only truly redundant slots — same position, same normal, same UV — coalesce.
Compacted arrays are sized to the canonical-slot count, so this fix also implicitly subsumes compactUnusedVertices for any vertices that became unused as a side-effect.
Idempotent: returns
{fixed: false}when every vertex slot is already unique under the (positions + normals + UVs) key.