is_point_on_segment_xy

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

Determine if a point lies on a given line segment on the XY-plane.

Parameters
  • point (sequence of float) – XY(Z) coordinates of a point.

  • segment (tuple, list) – XY(Z) coordinates of two points defining a segment.

  • tol (float, optional) – A tolerance for membership verification. Default is 1e-6.

Returns

boolTrue if the point is on the line segment. False otherwise.