跳转到主要内容

raygeo.ops.assembly.polyline

Functions

polyline_to_ops()

polyline_to_ops(
points: list[tuple[float, float, float]],
move_first: bool = True,
) -> ops.Ops

Convert a 3-D polyline into an Ops command sequence.

When move_first is True the first point is emitted as a MoveTo and subsequent points as LineTo. When move_first is False every point is emitted as a LineTo (useful for appending a polyline to an in-progress cut).

ParameterTypeDescription
pointslist[tuple[float, float, float]]List of (x, y, z) tuples.
move_firstbool = TrueWhether to emit the first point as a MoveTo.
Returnsops.OpsAn ~raygeo.ops.Ops container.
ComplexityO(n) where n = number of points

polyline_to_ops with move_first=True vs move_first=False

polyline_to_ops with move_first=True vs move_first=False