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

missing triangle #109

Closed
christophegithubtts opened this issue Dec 7, 2022 · 2 comments
Closed

missing triangle #109

christophegithubtts opened this issue Dec 7, 2022 · 2 comments

Comments

@christophegithubtts
Copy link

Hello
I have noticed that earcut outputs only 6 triangles instead of 7 from the following polygon
bug
bug.txt

I have also tried to offset all coordinates to make them relative to the first point but that does not solve the issue.
So i believe there is a bug which is quite surprising since the input polygon is very simple !

I hope someone can investigate this issue

@christophegithubtts
Copy link
Author

Also note that GLU tesselator outputs 7 triangles as expected

@mrgreywater
Copy link
Collaborator

mrgreywater commented Dec 7, 2022

This is known behavior. Earcut cleans up colinear points while triangulating.

image

Duplicate of mapbox/earcut#74 #100

@mrgreywater mrgreywater closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants