pyboxbuilder.paths.polygon_opposite_corners

pyboxbuilder.paths.polygon_opposite_corners(path: Sequence[tuple[float, float]]) → list[int][source]

Return indices of two opposite convex corners (furthest apart) of a polygon.

Parameters:
path: Sequence[tuple[float, float]]

Ordered vertices of a closed 2D polygon.

Returns:

Indices of the two convex vertices with maximum Euclidean separation.