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

Bad triangulation in shape with duplicate vertices #67

Open
casperlamboo opened this issue Aug 17, 2016 · 1 comment
Open

Bad triangulation in shape with duplicate vertices #67

casperlamboo opened this issue Aug 17, 2016 · 1 comment
Labels

Comments

@casperlamboo
Copy link

I have data sets that can contain duplicate vertices.

In this case the holes aren't handled correctly.
download
When I remove the duplicate vertices the holes are handled correctly.
download 1

It is possible to solve this by filtering out the duplicate vertices, but in some cases it would be useful to have the triangulation match the data set. (issue might be related to #52)

I've created an ESbin with example code

@finscn
Copy link

finscn commented Mar 22, 2017

I think the work about Cleaning & Simplify is not earcut's job.
If we can't ensure the polygon is a correct simple polygon , we could use other tools (e.g. jsclipper ) to do Cleaning & Simplify.
If earcut do too many works , the size & performance will be bad.

(Sorry , my english is very bad , I hope you could understand me )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants