mapbox / earcut

The fastest and smallest JavaScript polygon triangulation library for your WebGL apps
ISC License
2.21k stars 207 forks source link

Fix inifinite loop #148

Closed sreinhard closed 3 years ago

sreinhard commented 3 years ago

This fixes an issue when where earcut enters an infinite loop. The problem is that eliminateHole can remove the current node that is used in eliminateHoles.

In he test data the outer ring is completely degenerate, so a triangulation is not really possible.

This is related to #127 and #135 (submitted by colleagues of mine), but I could not reproduce the problems reported in those issues with the current version of earcut anymore.

mourner commented 3 years ago

@sreinhard released this as v2.2.3. Thanks again!

sreinhard commented 3 years ago

Thanks @mourner for getting this in so quick!