Line.closest_point

Line.closest_point(point, return_parameter=False)[source]

Compute the closest point on the line to a given point.

Parameters:
pointcompas.geometry.Point

The point.

return_parameterbool, optional

Return the parameter of the closest point on the line. Default is False.

Returns:
compas.geometry.Point

The closest point on the line.

float

The parameter of the closest point on the line. Only if return_parameter is True.