Skip to main content

raygeo.geo.algo.trochoid

Trochoidal path generation along a carrier polyline.

Provides generation of trochoidal paths with configurable diameter, engagement angle, and step-over ratio.

Functions

get_trochoid_along_3d()

get_trochoid_along_3d(
carrier: Sequence[tuple[float, float]],
diameter: float,
engagement_angle_deg: float = 90,
step_over_ratio: float = 0.2,
min_loop_radius: float = 0.5,
z: float = 0,
) -> list[tuple[float, float, float]]

Generate a trochoidal path along a carrier polyline.

ParameterTypeDescription
carrierSequence[tuple[float, float]]Sequence of (x, y) points defining the centerline.
diameterfloatTrochoid generating circle diameter.
engagement_angle_degfloat = 90Engagement angle in degrees (default 90).
step_over_ratiofloat = 0.2Forward advance per loop as fraction of diameter (default 0.2).
min_loop_radiusfloat = 0.5Minimum trochoid loop radius in mm (default 0.5).
zfloat = 0Z height for all points (default 0.0).
Returnslist[tuple[float, float, float]]List of (x, y, z) points forming the trochoidal path.
ComplexityO(n) time, O(n) space where n is proportional to path length / step

Trochoidal toolpath along a straight carrier — shallow vs steep engagement

Trochoidal toolpath along a straight carrier — shallow vs steep engagement

Trochoidal toolpath around an L-shaped corner

Trochoidal toolpath around an L-shaped corner

get_trochoid_along_3d_ramped()

get_trochoid_along_3d_ramped(
carrier: Sequence[tuple[float, float]],
diameter: float,
z_start: float,
z_end: float,
engagement_angle_deg: float = 90,
step_over_ratio: float = 0.2,
min_loop_radius: float = 0.5,
) -> list[tuple[float, float, float]]

Generate a trochoidal path with Z ramped along the carrier.

The Z coordinate descends linearly from z_start to z_end as a function of cumulative arc-length along the carrier.

ParameterTypeDescription
carrierSequence[tuple[float, float]]Sequence of (x, y) points defining the centerline.
diameterfloatTrochoid generating circle diameter.
z_startfloatZ height at the start of the carrier.
z_endfloatZ height at the end of the carrier.
engagement_angle_degfloat = 90Engagement angle in degrees (default 90).
step_over_ratiofloat = 0.2Forward advance per loop as fraction of diameter (default 0.2).
min_loop_radiusfloat = 0.5Minimum trochoid loop radius in mm (default 0.5).
Returnslist[tuple[float, float, float]]List of (x, y, z) points forming the ramped trochoidal path.
ComplexityO(n) time, O(n) space where n is proportional to path length / step

3D ramped trochoid along a long carrier with Z descending from start to end.

3D ramped trochoid along a long carrier with Z descending from start to end.