TSN: report deleted subshape matches
This commit is contained in:
@@ -160,5 +160,6 @@ export const matchSubshapes = (previous: Array<{ ref: SubshapeRef; signature: Su
|
||||
matches.push({ current: { ...candidate.ref, status: 'ambiguous', candidates: [best.entry.ref.persistentId, second.entry.ref.persistentId] }, score: best.score, status: 'ambiguous' })
|
||||
} else matches.push({ current: { ...candidate.ref, status: 'new' }, score: best?.score ?? 0, status: 'new' })
|
||||
}
|
||||
for (const entry of previous) if (!used.has(entry.ref.persistentId)) matches.push({ current: { ...entry.ref, status: 'deleted' }, previousId: entry.ref.persistentId, score: 0, status: 'deleted' })
|
||||
return matches
|
||||
}
|
||||
|
||||
@@ -151,6 +151,8 @@ test('topology signatures are independent of transient face indexes and flag amb
|
||||
const matches = matchSubshapes([{ ref: first.refs[0], signature: first.signatures[0] }], [{ ref: duplicate.refs[0], signature: duplicate.signatures[0] }])
|
||||
assert.equal(matches[0].status, 'stable')
|
||||
assert.equal(matches[0].previousId, first.refs[0].persistentId)
|
||||
const deleted = matchSubshapes([{ ref: first.refs[0], signature: first.signatures[0] }, { ref: duplicate.refs[1], signature: duplicate.signatures[1] }], [{ ref: duplicate.refs[0], signature: duplicate.signatures[0] }])
|
||||
assert.equal(deleted.at(-1)?.status, 'deleted')
|
||||
})
|
||||
|
||||
test('edge and vertex topology signatures are orientation/index independent', () => {
|
||||
|
||||
Reference in New Issue
Block a user