Description
There are some cases when polygon tessellation fails and it seems it is due to a bad election of the diagonal when splitting the polygon. Here I propose a patch that make sure when splitting a polygon that the resulting polygons are valid CW polygons.
In addition this patch adds few test to check the functionality of the tessellator and throws an error if the polygon cannot be splitted instead of just empty the current tessellation.