Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Assert during triangulation #142

Closed
alkonior opened this issue Oct 4, 2023 · 8 comments · Fixed by #143
Closed

Assert during triangulation #142

alkonior opened this issue Oct 4, 2023 · 8 comments · Fixed by #143
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@alkonior
Copy link

alkonior commented Oct 4, 2023

Assertion failed: outerTri != iT, file CDT\include\Triangulation.hpp, line 1625

Test file
p2t-test.txt

This is a seriously simplified testbed from poly2tri. debug2.dat

@alkonior
Copy link
Author

alkonior commented Oct 4, 2023

No intersections. No dots on the edges.
The polygon must be triangulated successfully.

image

@artem-ogre
Copy link
Owner

Thanks @alkonior. This was probably introduced in the last PR.
Feel free to roll back to the previous release if you need it to work urgently. Otherwise, I will look into it ASAP.

@artem-ogre artem-ogre added bug Something isn't working good first issue Good for newcomers labels Oct 4, 2023
@artem-ogre
Copy link
Owner

@alkonior
Could you please check the input file? It contains 9 vertices (indices from 0 to 8), but some edges have 9 as index. So maybe one vertex is missing?

@artem-ogre
Copy link
Owner

Should the right one be:

9 9
2.7145555 -1.5168651
2.5013921 -1.39569
3.0311139 -1.6827598
2.7610707 -1.5269606
2.7745042 -1.5207595
2.8049774 -1.4492451
4.2982483 -2.210517
2.8477705 -1.6077808
2.3252072 -1.3108287
0   1
1   2
2   3
3   4
4   5
5   6
6   7
7   8
8   0

@alkonior
Copy link
Author

alkonior commented Oct 4, 2023

Yes, my bad. It still throws an assert.

@artem-ogre
Copy link
Owner

Yes, thanks. I am looking into it.

@artem-ogre
Copy link
Owner

I think I got the fix. I will hopefully merge it after some more testing.
Here's the entire debug2 dataset:
cdt_screenshot

artem-ogre added a commit that referenced this issue Oct 4, 2023
- Fix multiple hanging edges, add regression tests
- Fix zeroes in `overlapCount`, fix tests
- Refactor splitting edge
artem-ogre added a commit that referenced this issue Oct 4, 2023
@artem-ogre artem-ogre linked a pull request Oct 4, 2023 that will close this issue
artem-ogre added a commit that referenced this issue Oct 4, 2023
- Fix multiple hanging edges, add regression tests
- Fix zeroes in `overlapCount`, fix tests
- Refactor splitting edge
artem-ogre added a commit that referenced this issue Oct 4, 2023
@artem-ogre
Copy link
Owner

@alkonior
I merged the fix and did a quick bugfix release.

Огромное спасибо за багрепорт!🙇

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants