is_polygon_in_polygon_xy
- compas.geometry.is_polygon_in_polygon_xy(polygon1, polygon2)[source]
Determine if a polygon is in the interior of another polygon on the XY-plane.
- Parameters
polygon1 (list) – List of XY(Z) coordinates of 2D or 3D points (Z will be ignored) representing the locations of the corners of the exterior polygon. The vertices are assumed to be in order. The polygon is assumed to be closed: the first and last vertex in the sequence should not be the same.
polygon2 (list) – List of XY(Z) coordinates of 2D or 3D points (Z will be ignored) representing the locations of the corners of the interior polygon. The vertices are assumed to be in order. The polygon is assumed to be closed: the first and last vertex in the sequence should not be the same.
- Returns
bool –
True
if polygon2 is inside polygon1.False
otherwise.