compas.geometry.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 (sequence of float) – XY(Z) coordinates of a point.

  • line (tuple) – Two XY(Z) points defining a line.

Returns

list – XYZ coordinates of closest point (Z = 0.0).