Point.on_polyline
- Point.on_polyline(polyline)[source]
Determine if the point lies on the given polyline.
- Parameters:
- polylinesequence[point] |
compas.geometry.Polyline
The polyline.
- polylinesequence[point] |
- 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_at(0.5) >>> point.on_polyline(poly) True