Update half-edge geometry in geometry layer in more places #2274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I already made sure the geometry layer is updated in all the obvious places in #2271, but it turns out there were quite a few more that are less obvious.
The problem here is that everywhere a half-edge is updated, by calling
update_curve
orupdate_start_vertex
, you create a new half-edge, and the new half-edge does not have any geometry associated with it in the geometry layer. That needs to be added manually, which is exactly what I did in this pull request.This is a pain, and error-prone, but I think it's only relevant during the current transition. I expect that long-term, only
Surface
,Curve
, andVertex
will have geometry associated with them, and since there's no reason to create new instances of those while wanting to keep the geometry, this problem won't be present then (they contain no topological data, so changing the geometry is literally the only reason you'd want to create a new instance).This is another step towards #2116, as now it's possible to actually use the geometry from the geometry layer. This is the next step, and removing that part of the geometry from the object graph can come right after.