Fix bug #74
Only water-huge2 failed .
the log says :
not ok 18 4464 triangles when expected 4461
I think maybe something is wrong in the test-case.
With this PR , it could solve the problem in #74 :

Cool! Can you describe the logic in more detail here?
the key code is :
var toRemove = false;
if (!p.steiner) {
if (equals(p, p.next) || equals(p.prev, p)) {
toRemove = true;
} else if (area(p.prev, p, p.next) === 0) {
// If `p.prev, p & p.next` are on holes (not outer edge) ,
// And `p.prev & p` are on the same hole ,
// Then do NOT remove `p` .
if (prevHole && nextHole && prevHole !== nextHole && prevHole === currentHole) {
toRemove = false;
} else {
toRemove = true;
}
}
}
But there is something I can't understand about
if (equals(p, p.next) || equals(p.prev, p)) {
toRemove = true;
if no || equals(p.prev, p) , the test-case in #74 will be failed.
Is there any news about this pr & issue ?
Is there any news about this pr & issue ???
@finscn sorry, I didn't have the chance to thoroughly review it yet. It's on my list. Feel free to use your forked version in the mean time.
I don't mean to add useless noise, but I'd be interested if there is a chance of this PR getting merged anytime soon.