Fix issue #296.
We need to recognize two consecutive bridges as a non-ear.
This commit is contained in:
parent
705249627a
commit
d8f5a8da32
@ -325,6 +325,8 @@ bool SContour::IsEar(int bp, double scaledEps) const {
|
||||
Vector jp = l[j].p;
|
||||
Vector kp = l[k].p;
|
||||
|
||||
// two consecutive bridges (A,B,C) and later (C,B,A) are not an ear
|
||||
if (jp.Equals(tr.c) && kp.Equals(tr.a)) return false;
|
||||
// check both edges from the point in question
|
||||
if (!RayIsInside(tr.a, tr.c, p,jp) && !RayIsInside(tr.a, tr.c, p,kp))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user