fix(IfcImporter): add vertex key to geometry dedup hash#238
Conversation
|
The issue references an concise ifc repro fixture that can be used as a test case (once vitest is in) |
ShaMan123
left a comment
There was a problem hiding this comment.
The vertex key construction is Claude's suggestion.
|
Actually I am not sure this is a correct fix. |
|
Great repro, it makes the problem obvious: both plates share outline, area, volume and centroid, and the only difference is where the holes sit, which is exactly what the old key never looked at. Direction is right. One thing to fix first: the let h = Math.round(position[i] * p) % MODULUS;
if (h < 0) h += MODULUS;And a question: does the key need to be order-invariant at all? The commutative sum buys a match on a permuted buffer but costs collision resistance, where an ordered polynomial hash is stronger and simpler. Do we actually see web-ifc emit permuted duplicates? If not, I'd take the ordered one. Minor: the AABB doesn't separate your two plates (same outline, same box), so The #237 repro would make a good regression test. Still a draft, what's left on your side? |
Description
closes #237
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following:
feat(examples): add hello-world example).fixes #123).