跳转到主要内容

raygeo.geo.algo.helix

Helical and conical helical path generation.

Provides generation of 3D helical polylines (cylindrical or conical) with configurable direction (CW/CCW), pitch, and expansion/reduction.

HelixDirection

Functions

generate_helix()

generate_helix(
center: tuple[float, float],
start_radius: float,
end_radius: float,
z_start: float,
z_end: float,
pitch: float,
direction: HelixDirection,
angular_step: float = 0.1,
min_revolutions: int | None = None,
) -> list[tuple[float, float, float]]

Generate a 3D helical polyline.

ParameterTypeDescription
centertuple[float, float]Center (x, y) of the helix.
start_radiusfloatStarting radius at z_start.
end_radiusfloatEnding radius at z_end.
z_startfloatStarting Z height.
z_endfloatEnding Z height (must be lower than z_start).
pitchfloatZ descent per full revolution.
directionHelixDirectionCW or CCW revolution.
angular_stepfloat = 0.1Angular step in radians per vertex (default 0.1).
min_revolutionsint | None = NoneMinimum number of revolutions (optional).
Returnslist[tuple[float, float, float]]List of (x, y, z) points approximating the helix.
ComplexityO(n) time, O(n) space where n = total_angle / angular_step

Cylindrical (CCW) and conical-expand (CW) helical paths

Cylindrical (CCW) and conical-expand (CW) helical paths