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

Colinear point creating an issue #73

Open
pmoulon opened this issue Sep 10, 2019 · 2 comments
Open

Colinear point creating an issue #73

pmoulon opened this issue Sep 10, 2019 · 2 comments

Comments

@pmoulon
Copy link

pmoulon commented Sep 10, 2019

I have a set of points that is creating an issue, I have a triangulation that provides a face that is having an area equal to 0:

0.0795366 -0.530036
-0.176999  -0.51317
-0.687401 -0.479614
-0.607259   0.73937
-0.244585  0.715526
0.191209 0.206457
0.186494 0.134742
 0.169533 -0.123232

Basically a face is created between the point [6,7,8] (0 area face).

Screen Shot 2019-09-10 at 3 28 44 PM

I would rather prefer to have [4,8,7] and [4,7,6] created instead.

@mrgreywater
Copy link
Collaborator

Have you checked it's actually returning the face [6,7,8]? Earcut often filters colinear points, therefore I assume it returns [4,8,6] and ignores 7 completely. You'll find the discussion about this behaviour here: mapbox/earcut#74

@pmoulon
Copy link
Author

pmoulon commented Sep 11, 2019

Yes it returns the face [6,7,8]. It was bothering me, so I checked faces area and saw one was 0.

Thx you for pointing me to the earcut thread.

By design a face of 0 area should not be returned.

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

3 participants