Polyline.parameter_at

Polyline.parameter_at(point, tol=None)[source]

Parameter of the polyline at a specific point.

Parameters:
point[float, float, float] | compas.geometry.Point

The point on the polyline.

tolfloat, optional

A tolerance value for verifying that the point is on the polyline. Default is TOL.absolute.

Returns:
float

The parameter of the polyline.

Examples

>>> from compas.geometry import Point
>>> polyline = Polyline([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0]])
>>> polyline.parameter_at(Point(0.1, 0.0, 0.0))
0.5