Support whole custom S-bend outlines and recover routing detours

This commit is contained in:
Jan Petykiewicz 2026-11-28 10:57:01 -08:00
commit 3d7fc3a705

View file

@ -218,7 +218,10 @@ def plan_ordered_bundle(problem: RoutingProblem, search: SearchOptions, *, infer
return problem
_, physical_geometry = resolve_bend_geometry(search)
bend = min(search.bend_radii, default=0.0)
if not isfinite(bend) or bend <= 0 or bend != int(bend) or bend not in search.sbend_radii or physical_geometry != "arc":
if (
not isfinite(bend) or bend <= 0 or bend != int(bend) or bend not in search.sbend_radii
or physical_geometry != "arc" or search.sbend_outlines
):
raise ValueError("Bundle routing needs a common integer radius for circular bends and S-bends")
radius = int(bend)
width = problem.nets[0].width