Disable tolerance in Orient2d collinearity test

This fixes failures for me when trying to triangulate
concave-by-less-than-epsilon boundary polylines.
This commit is contained in:
Roy Stogner 2022-03-15 19:16:40 -05:00
parent 8b5fa15800
commit 57b3039c05
1 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,10 @@ Orientation Orient2d(const Point& pa, const Point& pb, const Point& pc)
double detleft = (pa.x - pc.x) * (pb.y - pc.y);
double detright = (pa.y - pc.y) * (pb.x - pc.x);
double val = detleft - detright;
if (val > -EPSILON && val < EPSILON) {
// Using a tolerance here fails on concave-by-subepsilon boundaries
// if (val > -EPSILON && val < EPSILON) {
if (val == 0) {
return COLLINEAR;
} else if (val > 0) {
return CCW;