Pular para o conteúdo principal

raygeo.ops.transform.link

LinkStrategy

Functions

find_pass_entry()

find_pass_entry(ops: ops.Ops) -> tuple[float, float, float] | None

Find the entry point of an Ops sequence.

Scans for the first travel (MoveTo) endpoint, falling back to the first moving command endpoint.

ParameterTypeDescription
opsops.OpsAn ~raygeo.ops.Ops container.
Returnstuple[float, float, float] | None(x, y, z) or None if no moving commands exist.
ComplexityO(n) where n = number of commands

Entry and exit points from find_pass_entry / find_pass_exit

Entry and exit points from find_pass_entry / find_pass_exit

find_pass_exit()

find_pass_exit(ops: ops.Ops) -> tuple[float, float, float] | None

Find the exit point of an Ops sequence.

Scans backwards for the last moving command endpoint.

ParameterTypeDescription
opsops.OpsAn ~raygeo.ops.Ops container.
Returnstuple[float, float, float] | None(x, y, z) or None if no moving commands exist.
ComplexityO(n) where n = number of commands
link_passes(
passes: list[ops.Ops],
safe_z: float,
strategy: str | LinkStrategy,
) -> ops.Ops

Join ordered machining passes into a single Ops sequence.

The first pass is emitted as-is; subsequent passes are prefixed with travel moves according to strategy:

  • "retract" / LinkStrategy.RETRACT — retract to safe_z, move XY at that height, then descend to the next pass start Z.
  • "stay_down" / LinkStrategy.STAY_DOWN — move directly from the previous pass end to the next pass start without retracting.
ParameterTypeDescription
passeslist[ops.Ops]Ordered list of ~raygeo.ops.Ops passes.
safe_zfloatZ height for retract moves (mm).
strategystr | LinkStrategyLinking strategy.
Returnsops.OpsA single ~raygeo.ops.Ops container.
ComplexityO(n) where n = total commands across all passes

Three passes linked with StayDown vs Retract strategies

Three passes linked with StayDown vs Retract strategies