Skip to main content

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.

ParameterTypeDescription
geomGeometryA closed geometry.
stepfloatInward offset distance per pass.
max_passesint = 10Maximum number of offset passes (default 10).
min_areafloat = 1Minimum area to stop at (default 1.0).
Returnslist[Geometry]List of offset geometries, outermost first.
ComplexityO(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

Concentric inward offsets for adaptive clearing / pocketing