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

Allow valid Cycles to be empty; validate Face boundary instead #2095

Merged
merged 11 commits into from
Nov 15, 2023

Conversation

hannobraun
Copy link
Owner

If empty Cycles are invalid, then it's not possible to construct a face by creating it without a boundary and then adding one (i.e. Face::unbound().add_half_edges(...); this is pseudo-code, but the actual API works similar). This was a known problem, and there was a workaround for it (services.only_validate(specific_object)).

I ran into this problem again while working on #2023, but this time I had the realization that empty Cycles are actually okay, and it's unbound Faces that are the problem. In this pull request, I've re-shuffled the validation checks accordingly. This made it possible to remove the workaround, which made for a nice simplification.

I think "disconnected" can be understood to imply that they were
connected in the first place, while "not connected" does carry no such
connotation.

Also, `Edge` has been renamed to `HalfEdge` a while ago, so that part of
the new name is also more accurate.
That empty cycles are invalid makes the result of `BuildFace::unbound`
invalid by default, requiring a hacky workaround
(`Services::only_validate`).

I think empty cycles are actually fine. What's a problem is, if such an
empty cycle is used as the exterior of a face, and I will add a
validation check for that specifically.
@hannobraun hannobraun merged commit 18d768c into main Nov 15, 2023
4 checks passed
@hannobraun hannobraun deleted the validate branch November 15, 2023 11:31
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