artem-ogre/CDT

Assert during triangulation

alkonior opened this issue · 8 comments

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

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

image

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.

@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?

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

Yes, my bad. It still throws an assert.

Yes, thanks. I am looking into it.

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

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

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