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

Any way to make this use even-odd rule? #93

Open
jwwalker opened this issue Apr 6, 2021 · 1 comment
Open

Any way to make this use even-odd rule? #93

jwwalker opened this issue Apr 6, 2021 · 1 comment

Comments

@jwwalker
Copy link

jwwalker commented Apr 6, 2021

I was hoping to use earcut to replace the glu tessellation functions in OpenGL, but I get different results in some cases. For example, suppose you have 3 non-intersecting nested contours, a square inside a square inside a square. I was expecting to get triangles between the outermost and middle square, and inside the innermost square, but got something else. Can any adjustment be made, or is it just the wrong algorithm to do what I want?

@mourner
Copy link
Member

mourner commented Apr 6, 2021

Yeah, this library is designed specifically for valid polygon inputs without self-intersections, nested rings (beyond holes) etc. Handling more complex cases is a difficult problem and is out of scope for this library at the moment.

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