is_point_on_segment

compas.geometry.is_point_on_segment(point, segment, tol=1e-06)[source]

Determine if a point lies on a given line segment.

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

  • segment ([point, point] | Line) – A line segment.

  • tol (float, optional) – A tolerance for membership verification.

Returns

bool – True if the point is on the line segment. False otherwise.