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

Make triangulator exceptions optional #160

Merged
merged 2 commits into from
Jul 21, 2022
Merged

Make triangulator exceptions optional #160

merged 2 commits into from
Jul 21, 2022

Conversation

elalish
Copy link
Owner

@elalish elalish commented Jul 21, 2022

Fixes #148

The Boolean.Close test is no longer disabled. I added an execution param: processOverlaps, which tells the triangulator to be robust to overlapping input instead of throwing exceptions. The danger of course is that the triangulator can't actually do anything geometrically "good" with overlapped input, so it'll just make a basically arbitrary manifold triangulation. This has the potential to make small overlaps much worse, but it also solves this issue of small pieces of geometry getting past their precision limit.

I've looked at the output sphere; it seems generally fine (of course lots of small triangles along the diameter where the intersections are taking place). It's a bit hard to tell how overlapped they are, but hopefully its decent for most uses. Also, it's a pretty extreme input in the first place.

This now sets the stage for having a compile-time option to remove exceptions entirely.

One strange thing: I cut the test down from 10 to 6, because on 6 it was failing with munmap_chunk(): invalid pointer. I tried running valgrind, but it was so slow I gave up. We should look into this further; if we can manage to output the problem polygon, I should be able to debug it.

@elalish elalish self-assigned this Jul 21, 2022
@elalish elalish merged commit e9fc401 into master Jul 21, 2022
@elalish elalish deleted the exceptions branch July 21, 2022 20:07
@pca006132
Copy link
Collaborator

I will try to look into the invalid pointer issue.

cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
Make triangulator exceptions optional
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.

Triangulation error near precision limit
2 participants