Colinear point creating an issue
pmoulon opened this issue · comments
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).
I would rather prefer to have [4,8,7] and [4,7,6] created instead.
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
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.