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

Face equality comparison is broken #745

Closed
hannobraun opened this issue Jun 29, 2022 · 0 comments · Fixed by #754
Closed

Face equality comparison is broken #745

hannobraun opened this issue Jun 29, 2022 · 0 comments · Fixed by #754
Labels
topic: core Issues relating to core geometry, operations, algorithms type: bug Something isn't working

Comments

@hannobraun
Copy link
Owner

Comparing a Face to another using == (i.e. its PartialEq implementation) is broken. There are two problems:

  1. Color isn't compared.
  2. Local forms aren't compared.

Thanks to the recent cleanups, the fix is as simple as removing the PartialEq and Hash implementations of Face, and replacing them with derives. Unfortunately, this fix triggers a bug in the face reversal code. I have marked the problematic place in the code with a comment:
https://github.com/hannobraun/Fornjot/blob/c5395ab3f939af98f5c05ebf32010c28bd935ce0/crates/fj-kernel/src/algorithms/reverse.rs#L36-L45

I'm leaving it for now, but it will have to be fixed before #691 can progress much more.

@hannobraun hannobraun added type: bug Something isn't working topic: core Issues relating to core geometry, operations, algorithms labels Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Issues relating to core geometry, operations, algorithms type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant