geometry-central
geometry-central copied to clipboard
collapse: add fixup callback restore halfedge data
Fixes #134
In collapseEdgeTriangular, only whole degenerate edges are removed, so we can maintain the implicit sibling property. However, this results in losing at least one halfedge that should remain in the neighborhood after collapse. The lost halfedge is papered over with one of the halfedges from another edge, but this is incorrect if we want to maintain invariants on per-halfedge or per-corner data, such as UV coordinates.
This commit provides a callback, fixup, to collapseEdgeTriangular so that the user can restore the lost data