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 (sequence[point] |
compas.geometry.Polygon
) – List of XY(Z) coordinates of points representing the locations of the corners of the exterior polygon (Z will be ignored). 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 (sequence[point] |
compas.geometry.Polygon
) – List of XY(Z) coordinates of points representing the locations of the corners of the interior polygon (Z will be ignored). 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.