Pular para o conteúdo principal

raygeo.ops.assembly.adaptive.tool

Tool

Cutting-tool state for adaptive clearing.

Holds the tool centre position, heading, and the steering predictor / gyroscope buffers used to smooth the walking path. Construct with Tool(pos, heading, radius) and feed direction vectors via push_gyro between solver steps.

heading

heading: float

Current heading angle in radians.

pos

pos: tuple[float, float]

Tool centre position (x, y).

radius

radius: float

Tool radius in mm.

predicted_angle()

predicted_angle(max_deflection: float) -> float

Predictor seed for the engagement solver, clamped to a fraction of max_deflection.

ParameterTypeDescription
max_deflectionfloat
Returnsfloat

push_gyro()

push_gyro(dir: tuple[float, float]) -> None

Push a direction vector (dx, dy) into the gyroscope buffer.

ParameterTypeDescription
dirtuple[float, float]
ReturnsNone

raw_predictor()

raw_predictor() -> float

Raw (un-clamped) predictor value.

ParameterTypeDescription
Returnsfloat

reset_gyro()

reset_gyro() -> None

Reset the gyroscope and predictor history to the current heading.

ParameterTypeDescription
ReturnsNone

smoothed_heading()

smoothed_heading() -> float

Gyroscope-smoothed heading (radians), averaged over recent direction vectors.

ParameterTypeDescription
Returnsfloat

update_predictor()

update_predictor(delta: float) -> None

Update the decayed steering predictor with a converged deflection.

ParameterTypeDescription
deltafloat
ReturnsNone