centroid_polygon_vertices_xy

compas.geometry.centroid_polygon_vertices_xy(polygon)[source]

Compute the centroid of the vertices of a polygon projected to the XY plane.

Parameters

polygon (sequence[[float, float] or [float, float, float] | Point]) – A sequence of polygon point coordinates. The Z coordinates will be ignored.

Returns

[float, float, 0.0] – The XYZ coordinates of the centroid in the XY plane.