route_s_bend

photonforge.parametric.route_s_bend(*, port1, port2, euler_fraction=0, active_model='Waveguide', technology=None, name='', tidy3d_model_kwargs={}, waveguide_model_kwargs={})

Create an S bend connecting 2 compatible ports.

Parameters:
  • port1 (Port | tuple[Reference, str] | tuple[Reference, str, int]) – 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 (optinal, only for array references).

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

  • euler_fraction (float) – Fraction of the bends that is created using an Euler spiral (see photonforge.Path.arc()).

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

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

  • name (str) – Component name.

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

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

Returns:

Component with the route, including ports and model.

Return type:

Component

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