route_taper

photonforge.parametric.route_taper(*, terminal1=None, terminal2=None, layer=None, offset_distance=None, use_box=None, technology=None, name=None)[source]

Create a taper connecting 2 terminals.

Parameters:
  • terminal1 (Terminal | tuple[Reference, str] | tuple[Reference, str, int] | None) – First terminal to be connected. The terminal can be specified as a photonforge.Terminal or as a tuple including a photonforge.Reference, the terminal name, and the repetition index (optional, only for array references).

  • terminal2 (Terminal | tuple[Reference, str] | tuple[Reference, str, int] | None) – Second terminal to be connected.

  • layer (Annotated[str | tuple[int, int], _] | None) – Layer used for the connection. If None, the routing layer of the first terminal is used.

  • offset_distance (Annotated[float, units='μm'] | Annotated[Sequence[Annotated[float, units='μm']], maxItems=2, minItems=2] | None) – Offset applied to the terminal structure before creating the envelope taper. If None, defaults to 0.

  • use_box (bool | None) – Flag indicating whether to use the bounding box of the terminal structures or the structures themselves. If None, defaults to True.

  • technology (Technology | None) – Component technology. If None, the default technology is used.

  • name (str | None) – Component name.

Returns:

Component with the route.

Return type:

Component

terminal1 = pf.Terminal("METAL", pf.Rectangle((50, 50)))
terminal2 = pf.Terminal("METAL", pf.Rectangle(center=(100, -20), size=(15, 15)))
component = pf.parametric.route_taper(terminal1=terminal1, terminal2=terminal2)
route_taper