route_s_bend

photonforge.parametric.route_s_bend(*, port1=None, port2=None, euler_fraction=None, active_model=None, technology=None, name=None, tidy3d_model_kwargs=None, waveguide_model_kwargs=None)[source]

Create an S bend connecting 2 compatible ports.

Parameters:
  • port1 (Port | Annotated[tuple[Reference, str] | tuple[Reference, str, int], _] | None) – First port to be connected. The port can be specfied as a photonforge.Port or as a tuple including a photonforge.Reference, the port name, and the repetition index (optional, only for array references).

  • port2 (Port | Annotated[tuple[Reference, str] | tuple[Reference, str, int], _] | None) – Second port to be connected.

  • euler_fraction (Annotated[float, maximum=1, minimum=0] | None) – Fraction of the bends that is created using an Euler spiral (see photonforge.Path.arc()). If None, defaults to 0.

  • active_model (Annotated[Literal['Tidy3D', 'Waveguide'], _] | None) – Name of the model to be used by default; must be either "Tidy3D" or "Waveguide" (default).

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

  • name (Annotated[str, _] | None) – Component name.

  • tidy3d_model_kwargs (Annotated[dict[str, Any], _] | None) – Dictionary of keyword arguments passed to the component’s photonforge.Tidy3DModel.

  • waveguide_model_kwargs (Annotated[dict[str, Any], _] | None) – Dictionary of keyword arguments passed to the component’s photonforge.WaveguideModel.

Returns:

Component with the route, including ports and model.

Return type:

Component

component = pf.parametric.route_s_bend(
    port1=pf.Port((0, 0), 180, "Strip"), port2=pf.Port((20, 5), 0, "Strip"), euler_fraction=0.5
)
route_s_bend