closest_point_on_line

compas.geometry.closest_point_on_line(point, line)[source]

Computes closest point on line to a given point.

Parameters
  • point ([float, float, float] | Point) – XYZ coordinates.

  • line ([point, point] | Line) – Two points defining the line.

Returns

[float, float, float] – XYZ coordinates of closest point.

Examples

>>>

See also

basic.transformations.project_point_line()