Allow valid Cycle
s to be empty; validate Face
boundary instead
#2095
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.
If empty
Cycle
s 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
Cycle
s are actually okay, and it's unboundFace
s 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.