parametric.route_manhattan
route_manhattan( *, terminal1: photonforge.Terminal | tuple[photonforge.Reference, str] | tuple[photonforge.Reference, str, int] | None = None, terminal2: photonforge.Terminal | tuple[photonforge.Reference, str] | tuple[photonforge.Reference, str, int] | None = None, direction1: Literal['', 'x', 'y'] | None = None, direction2: Literal['', 'x', 'y'] | None = None, layer: Annotated[str | tuple[int, int], _] | None = None, width: Annotated[float, exclusiveMinimum=0, units='μm'] | None = None, overlap_fraction: Annotated[float, maximum=1, minimum=0] | Annotated[ Sequence[Annotated[float, maximum=1, minimum=0]], maxItems=2, minItems=2, ] | None = None, join_limit: Literal['round'] | float | None = None, waypoints: collections.abc.Sequence[ Annotated[ collections.abc.Sequence[Annotated[float, units='μm']], maxItems=2, minItems=2, ] ] | None = None, technology: photonforge.Technology | None = None, name: str | None = None,) -> photonforge.ComponentCreate a Manhattan path connecting 2 terminals.
Args
- terminal1: First terminal to be connected. The terminal can be specified as a
Terminalor as a tuple including aReference, the terminal name, and the repetition index (optional, only for array references). - terminal2: Second terminal to be connected.
- direction1: Direction (
"","x", or"y") of the route at the first terminal. - direction2: Direction (
"","x", or"y") of the route at the second terminal. - layer: Layer used for the connection. If
None, the routing layer of the first terminal is used. - width: Width of the routing path. If
None, the width is derived from the bounding box of the first terminal. - overlap_fraction: Fraction of the terminal bounding box that the route overlaps. If
None, defaults to 1. - join_limit: Join limit used by
Path.segment. IfNonedefaults to -1. - waypoints: Sequence of coordinates the route should go through.
- technology: Component technology. If
None, the default technology is used. - name: Component name.
Returns
Component with the route, including terminals.
Example
>>> terminal1 = pf.Terminal("METAL", pf.Rectangle((10, 10)))>>> terminal2 = pf.Terminal("METAL", pf.Rectangle(center=(180, -70), size=(10, 10)))>>> component = pf.parametric.route_manhattan(... terminal1=terminal1, direction1="x", terminal2=terminal2, waypoints=[(90, 50)]... )