Support propagation of attributes from the original mesh edges when
generating mesh edges. This implies both deduplication of original edges
and creation of new edges needed for faces. While original edges are not
propagated, attributes are still propagated if an edge was part of any
face. To make original edges distinct we simply choose the first one to
be a value source.
One important part of this patch is definition of invariant of the
mesh on input:
1. All edges must be valid (their vertices must be correct). The
algorithm only deal with duplicate and implicit edges.
2. There is no way to provide info about corner edges attribute (whether
it'svalid or not). If all input edges are valid and there are no new
edges then we could skip re-generation of already valid corner edge
indices. But for now we always do.
The new implementation depends on input mesh invariant so this drops an
old patch to fix hard crash related with duplicate edge vertices. New
code will crash independently to such patch. Hopefully there must be
no problems after #138633.
The changes don't affect performance much. If anything, in some cases
the edge calculation can become a few percent faster. See the PR for
more performance testing details.
Pull Request: https://projects.blender.org/blender/blender/pulls/132492