Is there a way to resolve cyclic polygons?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RoniPerson

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 polygon_b is enclosed by polygon_a, returns an outer polygon (boundary) and inner polygon (hole) which could be distiguished by calling is_polygon_clockwise.

But I see no way to handle this sort of polygon. You can’t use it with the clip and 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)