route_taper

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

Create a taper connecting 2 terminals.

Parameters:
  • terminal1 (Terminal | tuple[Reference, str] | tuple[Reference, str, int]) – 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]) – Second terminal to be connected.

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

  • offset_distance (float | tuple[float]) – Offset applied to the terminal structure before creating the envelope taper. If None, defaults to 0.

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

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

  • name (str) – Component name.

Returns:

Component with the route.

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