closest_point_on_line_xy

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

Compute closest point on line (continuous) to a given point lying in the XY-plane.

Parameters
  • point ([float, float] or [float, float, float] | Point) – XY(Z) coordinates of a point.

  • line ([point, point] | Line) – Two XY(Z) points defining a line.

Returns

[float, float, 0.0] – XYZ coordinates of the closest point in the XY plane.