Skip to main content

Module containment

Module containment 

Source
Expand description

Polygon containment checking.

Determines if one polygon (set of convex parts) is fully inside another. Uses vertex checking plus edge midpoint sampling (t=1/3, t=2/3) for multi-part outer polygons where the composite shape may be concave.

Ported from polygon.move::contains_polygon / part_is_inside_parts.

Functions§

contains_polygon
True if the inner polygon (set of parts) is fully contained within the outer polygon.
point_inside_any_part
True if point (x, y) is inside any of the given convex parts.