Aller au contenu principal

raygeo.geo.algo.spiral

Flat Archimedean spiral path generation.

Produces a constant-Z spiral from a start radius to an end radius with configurable direction, revolutions, and angular resolution. Used for widening after a helical entry (EntryStrategy.Helix expand_to_diameter).

Functions

generate_spiral()

generate_spiral(
center: tuple[float, float],
z: float,
start_radius: float,
end_radius: float,
revolutions: float,
direction: helix.HelixDirection,
angular_step: float = 0.1,
) -> list[tuple[float, float, float]]

Generate a flat Archimedean spiral at constant Z.

The spiral sweeps linearly from start_radius to end_radius over the requested number of revolutions.

ParameterTypeDescription
centertuple[float, float]Center (x, y) of the spiral.
zfloatConstant Z height of the spiral.
start_radiusfloatStarting radius.
end_radiusfloatEnding radius.
revolutionsfloatTotal turns (may be fractional).
directionhelix.HelixDirectionCW or CCW revolution.
angular_stepfloat = 0.1Angular step in radians per vertex (default 0.1).
Returnslist[tuple[float, float, float]]List of (x, y, z) points approximating the spiral.
ComplexityO(n) time, O(n) space where n = total_angle / angular_step

Outward (CCW) and inward (CW) flat Archimedean spirals

Outward (CCW) and inward (CW) flat Archimedean spirals