You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fabian-flassig edited this page May 18, 2026
·
3 revisions
Cleans a 2D polygon loop and returns the cleaned result as one or more loops.
This function is located in the pygeo module.
The function is intended for 2D polygon cleanup in the local u/v plane. Self-intersections, overlaps and similar invalid loop configurations are resolved by the internal pseudo-face cleanup logic. The result is returned as plain point loops without arc descriptions.
pygeo.clean_polygon_2d(points)
Parameter
Type
Description
points
{{u,v}, ...}
Coordinates of the input loop points in 2D. The loop is treated as closed.
Return value
Type
Description
loops
{{{u,v}, ...}, ...}
Notes:
This is a purely 2D cleanup function. Input and output use u/v coordinates only.
The input is a single loop only. If multiple loops or holes are required, use pygeo.clean_polygon_2d_ex.
The returned loops contain only point coordinates. Arc, radius, angle and bulge information is not preserved in the result.
The result may contain more than one loop if cleanup splits the input into multiple valid loops.
The outer loop is returned in CCW orientation, inner loops in CW orientation.