Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant geometry from HalfEdge #2283

Merged
merged 3 commits into from
Mar 22, 2024
Merged

Remove redundant geometry from HalfEdge #2283

merged 3 commits into from
Mar 22, 2024

Conversation

hannobraun
Copy link
Owner

This is another step towards #2116.

Half-edge geometry is supposed to be stored per-object, which is what
this commit achieves. Previously, it would have been overwritten, if an
object that happened to be equal was stored.

This bug doesn't manifest so far, because the geometry that is stored is
still redundantly part of `HalfEdge` itself, so you'd never overwrite
something that wasn't equal anyway. This will change, of course, as soon
as the redundant geometry definition in `HalfEdge` is removed.

This is one of those colossally stupid bugs that shouldn't have happend
in the first place. It's good though, because it helped me realize two
things:

1. The distinction between `Handle` and `HandleWrapper` is a footgun.
2. That distinction is also no longer necessary.

With geometry being stored in a dedicated layer, the times of needing to
compare objects for equality are coming to and end. There is simply no
reason to ever expect to objects to be equal, if they aren't also
identical.

This means, it should be possible to make `Handle` behave like
`HandleWrapper`, replace `HandleWrapper` with the new and improved
`Handle`, and then remove the `Eq`/`PartialEq` implementations for all
objects. Because otherwise, that's another footgun waiting to happen.

That's what I'll be doing next.
@hannobraun hannobraun enabled auto-merge March 22, 2024 17:20
@hannobraun hannobraun merged commit 7115ad0 into main Mar 22, 2024
4 checks passed
@hannobraun hannobraun deleted the geometry branch March 22, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant