closest_point_on_polygon_xy
- compas.geometry.closest_point_on_polygon_xy(point, polygon)[source]
Compute closest point on a polygon to a given point lying in the XY-plane.
- Parameters:
- point[float, float] or [float, float, float] |
compas.geometry.Point
XY(Z) coordinates of a 2D or 3D point (Z will be ignored).
- polygonsequence[point] |
compas.geometry.Polygon
A sequence of XY(Z) coordinates of 2D or 3D points (Z will be ignored) representing the locations of the corners of a 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.
- point[float, float] or [float, float, float] |
- Returns:
- [float, float, 0.0]
XYZ coordinates of closest point in the XY plane.