closest_point_on_segment

compas.geometry.closest_point_on_segment(point, segment)[source]

Computes closest point on line segment (p1, p2) to test point.

Parameters
  • point (sequence of float) – XYZ coordinates.

  • saegment (tuple) – Two points defining the segment.

Returns

list – XYZ coordinates of closest point.

Examples

>>>