I'm working a little bit with
Geometry and the
clip_polygons_2d method. This method can under some conditions return a polygon with a hole.
If polygonb is enclosed by polygona, returns an outer polygon (boundary) and inner polygon (hole) which could be distiguished by calling ispolygonclockwise.
But I see no way to handle this sort of polygon. You can't use it with the
merge functions. And I need to use clip this polygon further.
At the moment i combine the outer an dthe inner ring to one polygon by connecting their first points. But this causes problems when triangulating beacause the points overlap. And shrinking the polygon before triangulation produces artefacts when rendering it later.
It would be optimal to split such a polygon into 2 polygons without holes. But I can't find a way to that.
Here is an image of what I want to achieve (with simple polygons)