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 ([float, float, float] | Point) – XY(Z) coordinates of a point.

  • segment ([point, point] | Line) – XY(Z) coordinates of two points defining a segment.

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

Returns

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