Point.on_line

Point.on_line(line)[source]

Determine if the point lies on the given line.

Parameters

line ([point, point] | compas.geometry.Line) – The line.

Returns

bool – True, if the point lies on the line. False, otherwise.

Examples

>>> from compas.geometry import Line
>>> line = Line(Point(1.0, 0.0, 0.0), Point(1.0, 1.0, 0.0))
>>> point = line.point(1.5)
>>> point.on_line(line)
True