[Pather/RenderPather] Add U-bend to trace_into

This commit is contained in:
jan 2026-03-07 00:03:07 -08:00
commit 0189756df4
2 changed files with 15 additions and 1 deletions

View file

@ -322,7 +322,9 @@ class PatherMixin(PortList, metaclass=ABCMeta):
(travel, jog), _ = port_src.measure_travel(port_dst)
self.jog(portspec_src, -jog, -travel, **dst_args)
elif numpy.isclose(angle, 0):
raise BuildError("Don't know how to route a U-bend yet (TODO)!")
# U-bend
(travel, jog), _ = port_src.measure_travel(port_dst)
self.uturn(portspec_src, -jog, length=-travel, **dst_args)
else:
raise BuildError(f"Don't know how to route ports with relative angle {angle}")