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

Fixed edge collapse #137

Merged
merged 9 commits into from
Jun 5, 2022
Merged

Fixed edge collapse #137

merged 9 commits into from
Jun 5, 2022

Conversation

elalish
Copy link
Owner

@elalish elalish commented Jun 5, 2022

Fixes #136
Fixes #109
Fixes #102

Looks like these were in fact related problems. I've added some tests, but would be great to get independent verification, since I probably haven't tested every permutation.

The problem was my swap edges algorithm; the issue is that sometimes the triangulator will introduce a 4-manifold edge by creating the same edge (between the same verts) inside two different faces. These must be removed; I had tried to swap one edge across its quadrilateral, but the problem was sometimes this was simply resulting in a different 4-manifold edge, which then caused SimplifyTopology to fail. Now I've simplified halfedge creation and instead deal with 4-manifold edges at the beginning of SimplifyTopology. I handle them robustly by duplicating a vert and inserting triangles, which should always resolve the problem.

@elalish elalish self-assigned this Jun 5, 2022
@elalish
Copy link
Owner Author

elalish commented Jun 5, 2022

This took a lot longer to fix than I'd hoped; several false starts that fixed portions but didn't end up being helpful, and then catching COVID in the midst. It's definitely more robust now though!

@elalish elalish merged commit ed272b0 into master Jun 5, 2022
@elalish elalish deleted the infiniteLoop branch June 5, 2022 20:21
@pca006132 pca006132 mentioned this pull request Jun 5, 2022
cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
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.

Boolean operation segfault infinite loop in CollapseEdge union error for manifolds
1 participant