Skip to main content

raygeo.ops.assembly.toroid

Functions

generate_toroid()

generate_toroid(
part: ops.part.Part,
carrier: Sequence[tuple[float, float]],
tool_radius: float,
step_over: float,
target_z: float,
direction: str = 'CW',
angular_step: float = 0.1,
state: ops.state.State | None = None,
) -> ops.assembly.AssemblyResult

Generate a toroidal (trochoidal) path along a carrier.

Produces a trochoidal looping path that follows the carrier polyline, clearing a slot of width tool_radius.

ParameterTypeDescription
partops.part.Part
carrierSequence[tuple[float, float]]List of (x, y) waypoints defining the slot axis.
tool_radiusfloatTool radius in mm.
step_overfloatForward advance per trochoid loop.
target_zfloatCutting Z height.
directionstr = 'CW'"CW" or "CCW" (default "CW").
angular_stepfloat = 0.1Angular step in radians (default 0.1).
stateops.state.State | None = NoneOptional machine state to apply before the path.
Returnsops.assembly.AssemblyResultAn AssemblyResult with the toroidal path.

Trochoidal slot path along a carrier polyline

Trochoidal slot path along a carrier polyline

generate_toroidal_clear()

generate_toroidal_clear(
part: ops.part.Part,
carrier: Sequence[tuple[float, float]],
start: tuple[float, float, float],
target_z: float,
tool_radius: float,
step_over: float,
max_ramp_angle_deg: float = 5,
direction: str = 'CW',
angular_step: float = 0.1,
state: ops.state.State | None = None,
) -> ops.assembly.AssemblyResult

Generate a ramp-down toroidal clear path along a carrier.

Descends Z linearly along the carrier's arc-length at a slope capped by max_ramp_angle_deg, zig-zagging back-and-forth along the carrier until target_z is reached, then emits one final full forward pass at constant target_z.

ParameterTypeDescription
partops.part.Part
carrierSequence[tuple[float, float]]2D polyline (x, y) waypoints defining the slot axis.
starttuple[float, float, float](x, y, z) entry point; x, y should match carrier[0], z is the entry height.
target_zfloatFinal cutting Z height.
tool_radiusfloatTool radius in mm.
step_overfloatForward advance per trochoid loop.
max_ramp_angle_degfloat = 5Maximum descent angle vs. the XY plane (default 5°).
directionstr = 'CW'"CW" or "CCW" (default "CW").
angular_stepfloat = 0.1Angular step in radians (default 0.1).
stateops.state.State | None = NoneOptional machine state.
Returnsops.assembly.AssemblyResultAn AssemblyResult with the ramp-down + flat-final toroidal path.

3D ramp-down toroidal clear zig-zagging along a short carrier with full ramp descent.

3D ramp-down toroidal clear zig-zagging along a short carrier with full ramp descent.