Skip to main content

raygeo.ops.assembly.wavefront

Functions

adaptive_wavefronts()

adaptive_wavefronts(
part: ops.part.Part,
step_over: float = 2,
z: float = 0,
area_tolerance: float = 1,
precision: float = 0,
cut_feed_rate: int = 1200,
cut_power: float = 1,
) -> ops.assembly.AssemblyResult

Inside-out adaptive wavefronts.

Finds the largest inscribed circle inside part's boundary, seeds the cleared area with concentric rings spaced step_over apart, then iteratively expands the frontier outward by step_over, clipping to the boundary. The loop terminates when the newly added area drops below area_tolerance.

Each ring fragment is emitted as MoveTo + LineTo at height z with cut_feed_rate applied.

ParameterTypeDescription
partops.part.PartThe part whose stock_region defines the pocket boundary and islands.
step_overfloat = 2Radial expansion per iteration (default 2.0).
zfloat = 0Z height for generated commands (default 0.0).
area_tolerancefloat = 1Minimum area increase to continue (default 1.0).
precisionfloat = 0Edge tolerance for frontier simplification and vertex resampling; smaller values produce denser edges (default 0.0 = use internal default).
cut_feed_rateint = 1200Feed rate for cutting moves (default 1200).
cut_powerfloat = 1Laser power for cutting moves (0.0-1.0, default 1.0).
Returnsops.assembly.AssemblyResultAn AssemblyResult with wavefront cutting commands.

Adaptive wavefronts expand from the initial cleared disk (blue) to fill the pocket boundary (black)

Adaptive wavefronts expand from the initial cleared disk (blue) to fill the pocket boundary (black)

Adaptive wavefronts in a pocket with three islands — contours wrap around each island as they expand

Adaptive wavefronts in a pocket with three islands — contours wrap around each island as they expand

Adaptive wavefronts in a Y-shaped channel — contours split and propagate along each branch

Adaptive wavefronts in a Y-shaped channel — contours split and propagate along each branch

adaptive_wavefronts_multi_pocket()

adaptive_wavefronts_multi_pocket(
part: ops.part.Part,
step_over: float = 2,
offset_mm: float = 0,
area_tolerance: float = 0.01,
precision: float = 0,
cut_feed_rate: int = 1200,
cut_power: float = 1,
profile: bool = False,
) -> ops.assembly.AssemblyResult

Multi-pocket adaptive wavefronts.

Extracts all pockets from part.geometry, optionally offsets the boundary inward by offset_mm, seeds each pocket with concentric rings spaced step_over apart, and runs wavefront expansion inside each pocket. Returns the combined result.

Raises: ValueError — If the part has no geometry or no closed contours.

ParameterTypeDescription
partops.part.PartThe part whose geometry defines the pockets.
step_overfloat = 2Radial expansion per iteration (default 2.0).
offset_mmfloat = 0Inward offset applied to all contours (default 0.0).
area_tolerancefloat = 0.01Minimum area increase to continue (default 0.01).
precisionfloat = 0Edge tolerance for frontier simplification (default 0.0).
cut_feed_rateint = 1200Feed rate for cutting moves (default 1200).
cut_powerfloat = 1Laser power for cutting moves (0.0-1.0, default 1.0).
profilebool = FalsePrint a profiling report to stdout (default False).
Returnsops.assembly.AssemblyResultAn AssemblyResult with combined wavefront paths.

Adaptive wavefronts in a complex SVG shape — contours adapt to the boundary and wrap around islands

Adaptive wavefronts in a complex SVG shape — contours adapt to the boundary and wrap around islands