route_manhattan¶
- photonforge.parametric.route_manhattan(*, terminal1=None, terminal2=None, direction1=None, direction2=None, layer=None, width=None, overlap_fraction=None, join_limit=None, waypoints=None, technology=None, name=None)[source]¶
Create a Manhattan path connecting 2 terminals.
- Parameters:
terminal1 (Terminal | Annotated[tuple[Reference, str] | tuple[Reference, str, int], _] | None) – First terminal to be connected. The terminal can be specified as a
photonforge.Terminalor as a tuple including aphotonforge.Reference, the terminal name, and the repetition index (optional, only for array references).terminal2 (Terminal | Annotated[tuple[Reference, str] | tuple[Reference, str, int], _] | None) – Second terminal to be connected.
direction1 (Annotated[Literal['', 'x', 'y'], _] | None) – Direction (“”, “x”, or “y”) of the route at the first terminal.
direction2 (Annotated[Literal['', 'x', 'y'], _] | None) – Direction (“”, “x”, or “y”) of the route at the second terminal.
layer (Annotated[str | tuple[int, int], _] | None) – Layer used for the connection. If
None, the routing layer of the first terminal is used.width (Annotated[float, exclusiveMinimum=0, units='μm'] | None) – Width of the routing path. If
None, the width is derived from the bounding box of the first terminal.overlap_fraction (Annotated[Annotated[float, maximum=1, minimum=0] | Annotated[Sequence[Annotated[float, maximum=1, minimum=0]], maxItems=2, minItems=2], _] | None) – Fraction of the terminal bounding box that the route overlaps. If
None, defaults to 1.join_limit (Annotated[Literal['round'] | float, _] | None) – Join limit used by
photonforge.Path.segment(). IfNonedefaults to -1.waypoints (Annotated[Sequence[Annotated[Sequence[Annotated[float, units='μm']], maxItems=2, minItems=2]], _] | None) – Sequence of coordinates the route should go through.
technology (Annotated[Technology, _] | None) – Component technology. If
None, the default technology is used.name (Annotated[str, _] | None) – Component name.
- Returns:
Component with the route.
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)]
)