Point.on_line
- Point.on_line(line, tol=None)[source]
Determine if the point lies on the given line.
- Parameters:
- line[point, point] |
compas.geometry.Line
The line.
- tolfloat, optional
A tolerance value for the distance between the point and the line. Default is
TOL.absolute
.
- line[point, point] |
- 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