raygeo.geo.algo.offset
Polygon offsetting operations for geometry data.
Provides concentric inward offset generation for adaptive clearing and pocketing toolpath generation.
Functions
concentric_offsets()
concentric_offsets(
geom: Geometry,
step: float,
max_passes: int = 10,
min_area: float = 1,
) -> list[Geometry]
Generate concentric inward offsets of a geometry.
Each successive offset shrinks the boundary by step. Stops early when the enclosed area drops
below min_area or max_passes is reached. Returns offsets outermost-first.
| Parameter | Type | Description |
|---|---|---|
geom | Geometry | A closed geometry. |
step | float | Inward offset distance per pass. |
max_passes | int = 10 | Maximum number of offset passes (default 10). |
min_area | float = 1 | Minimum area to stop at (default 1.0). |
| Returns | list[Geometry] | List of offset geometries, outermost first. |
| Complexity | O(n * p) time, O(n) space where n is the number of contour vertices and p the number of passes |

Concentric inward offsets for adaptive clearing / pocketing