is_point_in_polygon_xy

compas.geometry.is_point_in_polygon_xy(point, polygon)[source]

Determine if a point is in the interior of a polygon lying on the XY-plane.

Parameters:
point[float, float, float] | compas.geometry.Point

XY(Z) coordinates of a point (Z will be ignored).

polygonsequence[point] | compas.geometry.Polygon

A sequence of XY(Z) coordinates of points representing the locations of the corners of a 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 the point is in the polygon. False otherwise.

Warning

A boundary check is not yet implemented. This should include a tolerance value.