Merged
Conversation
Contributor
Author
Contributor
Author
|
Another thought, in "Progressive Shell Quasistatics for Unstructured Meshes" we jiggle nearly colliding vertices into intersection free configurations. Seem unprincipled but I convinced myself that the problem is sufficiently hard that a randomized algorithm is a reasonable response. I think a similar approach would work well for finding a non-self-intersecting, manifold mesh that's close(est) to the input:
Would also be a good use case for the dynamic AABB that just merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

The previous method (and the old one in gptoolbox) was cool cause it wouldn't just create boundaries at the non-manifold edge chains. It would identify big manifold components across non-manifold edges. Unfortunately, it was just getting lucky. It would find those if they were in order in the list of faces, and fail to correctly split the mesh oetherwise. (Some of the new tests will fail the old code).
At one point I set out to implement "Cutting and Stitching: Converting Sets of Polygons to Manifold Surfaces" [Guéziec et al. 2001] but its details are a bit confusing and it's not quite written with proofs so I got nervous I'd make an elaborate implementation and still have failure cases.
Instead, I implemented the "obvious" thing. Split all the edges, then try to stitch them back. Only allow a stitch if the resulting mesh continues to be manifold. The order still matters to get nice components, so this implementation does a depth-first traversal on stitched edges as it goes.
This is purely combinatorial. It'd be cool to use geometry to prefer outputting a "solid" mesh.
Finally, "manifold" doesn't necessarily mean orientable, but this code is assuming the output should also be orientable (I claim the common case). It shouldn't be too hard to add a flag that allows non-orientable output.