Point.on_polyline
- Point.on_polyline(polyline)[source]
Determine if the point lies on the given polyline.
- Parameters
polyline (sequence[point] |
compas.geometry.Polyline
) – The polyline.- Returns
bool – True, if the point lies on the polyline. False, otherwise.
Examples
>>> from compas.geometry import Polyline >>> poly = Polyline([Point(0.0, 0.0, 0.0), Point(1.0, 0.0, 0.0), Point(2.0, 0.0, 0.0)]) >>> point = poly.point(0.5) >>> point.on_polyline(poly) True