0 votes

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 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)
enter image description here

Godot version 3.2.3.stable
in Engine by (298 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.