Refactor routing internals and archive retry benchmarks

This commit is contained in:
Jan Petykiewicz 2026-11-26 19:58:46 -08:00
commit ea5cfe7f31

14
inire/geometry/sbend.py Normal file
View file

@ -0,0 +1,14 @@
"""Exact S-bend dimensions for constructive planners."""
from math import isqrt
def exact_sbend_spans(radius: int) -> dict[int, int]:
"""Map lateral offsets to their positive integer spans for a fixed radius."""
spans = {}
for offset in range(1, 2 * radius):
squared = offset * (4 * radius - offset)
span = isqrt(squared)
if span * span == squared:
spans[offset] = span
return spans