- compas.geometry.distance_point_line(point, line)
Compute the distance between a point and a line.
point (list, tuple) – Point location.
line (list, tuple) – Line defined by two points.
float – The distance between the point and the line.
This implementation computes the right angle distance from a point P to a line defined by points A and B as twice the area of the triangle ABP divided by the length of AB 1.
Wikipedia. Distance from a point to a line. Available at: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line