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

Fix known surface duplication issues #1174

Merged
merged 8 commits into from
Oct 6, 2022
Merged

Fix known surface duplication issues #1174

merged 8 commits into from
Oct 6, 2022

Conversation

hannobraun
Copy link
Owner

This builds upon the previous work done in #1168, #1170, #1172, and other pull requests, fixing all other known surface duplication issues and updating any surface-related validation code to use surface identity instead of surface equality, making this validation code much stricter and preventing possible bugs. This was made possible by advancements in #1021.

See the documentation added in this commit for a detailed explanation:
https://github.com/hannobraun/Fornjot/blob/87612f1e04be115528ba7dc929fef5bc442348e7/crates/fj-kernel/src/objects/mod.rs#L8-L71

The vertex transform code transformed the surface form directly, instead
of converting it into a partial object first. This gave the higher-level
transform code no opportunity to override the surface later, making it
impossible not to create duplicate surfaces.
@hannobraun
Copy link
Owner Author

CI is failing because I overlooked another problem that I accidentally introduced. I'm looking into it.

If there already was a `Some(PartialSurfaceVertex)`, it would just leave
it as is, instead of overriding its surface and other data. This would
result in duplicate surfaces being created when transforming a
half-edge.
@hannobraun
Copy link
Owner Author

hannobraun commented Oct 6, 2022

Figured it out. These damn bugs can be so subtle... good thing we have validation code!

@hannobraun hannobraun merged commit b7bfad0 into main Oct 6, 2022
@hannobraun hannobraun deleted the surface branch October 6, 2022 15:00
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