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

Wrong tessellation of self-intersecting contour #33

Open
bishopnator opened this issue Apr 9, 2019 · 1 comment
Open

Wrong tessellation of self-intersecting contour #33

bishopnator opened this issue Apr 9, 2019 · 1 comment

Comments

@bishopnator
Copy link

bishopnator commented Apr 9, 2019

I tested a little your library and I created a case which is incorrectly tessellated. I attached a test file - it contains the problematic contour. First line contains number of vertices and then followed vertices (x, y, z values split by spaces).
contour3.txt

I use the LibTess2 library with doubles instead of floats (TESSreal type). The problematic intersection is between edge (2-1) and edge (75-76) (numbers are the indices of vertices). I tried also to debug the the code in sweep.c but I didn't find exactly where the problem is. If all vertices are slightly rotated around z-axis (like by 5 degrees) than the tessellation is correct.

note: option TESS_CONSTRAINED_DELAUNAY_TRIANGULATION changes the output triangles, but it produces same filled area

The wrong tessellation:
contour3_output

@EvanBalster
Copy link

See this comment describing a much simpler error case. #37 (comment)

I uploaded some source code that doesn't seem to exhibit that bug.

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

No branches or pull requests

2 participants