Aller au contenu principal

raygeo.cnc.machining.wavefront

Functions

build_wavefront_workplan()

build_wavefront_workplan(
pocket_boundary: Sequence[tuple[float, float]],
islands: Sequence[Sequence[tuple[float, float]]] | None = None,
tool_radius: float = 3,
step_over: float = 2,
target_z: float = -5,
safe_margin: float = 1,
angular_step: float = 0.1,
area_tolerance: float = 1,
precision: float = 0,
) -> list[dict]

Build a spiral-seed + wavefront-expansion workplan.

Finds the largest inscribed circle, emits a FlatSpiral step that seeds the pocket centre with a cleared disk, then a Wavefront step that expands outward. No helical plunge is produced: the spiral disk already covers the area the helix used to, so the wavefront seed is identical to the legacy adaptive_entry path.

Combine with raygeo.cnc.machining.plan.Workplan to turn the steps into a toolpath.

ParameterTypeDescription
pocket_boundarySequence[tuple[float, float]]Outer boundary as [(x, y), ...].
islandsSequence[Sequence[tuple[float, float]]] | None = NoneList of island polygons (default None).
tool_radiusfloat = 3Tool radius in mm (default 3.0).
step_overfloat = 2Radial step-over (default 2.0).
target_zfloat = -5Target cutting depth (default -5.0).
safe_marginfloat = 1Safety margin from tool edge (default 1.0).
angular_stepfloat = 0.1Angular step in radians (default 0.1).
area_tolerancefloat = 1Convergence area tolerance (default 1.0).
precisionfloat = 0Vertex resampling spacing, 0 to disable (default 0.0).
Returnslist[dict]List of WorkplanStep dicts (FlatSpiral then Wavefront).