Fix #108517: Mesh split edges can give invalid indices #108826

Merged
Hans Goudey merged 3 commits from HooglyBoogly/blender:fix-split-edges-bad-indices into blender-v3.6-release 2023-06-13 14:10:18 +02:00

3 Commits

Author SHA1 Message Date
Hans Goudey 79d67b39b0 Cleanup 2023-06-13 08:07:36 -04:00
Hans Goudey 54c65fdcc6 Merge branch 'blender-v3.6-release' into fix-split-edges-bad-indices 2023-06-13 08:06:30 -04:00
Hans Goudey 733a0c48f0 Fix #108517: Mesh split edges can give invalid indices
buildbot/vexp-code-patch-coordinator Build done. Details
The split edges code had a complex method of merging duplicate edges,
going backwards to avoid shifting elements in a vector. Sometimes it
could result in incorrect corner edge indices though, if it moved an
index that matched one of the local variables (I think! I've been trying
to understand this all day and still struggling). Instead, replace it
with a `VectorSet` that handles the deduplication by itself, and
avoid creating the new edges until the end of the algorithm.

I think this code could still be simpler if we tried to reduce the
amount of things happening at the same time, making more code
deal with the input or final state rather than an in-between one.
But to avoid making the change too complicated I stopped here.
2023-06-09 17:22:44 -04:00