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 (Annotated[Port | tuple[Reference, str] | tuple[Reference, str, int], _Metadata(type=Port, title=None, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | 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 (Annotated[Port | tuple[Reference, str] | tuple[Reference, str, int], _Metadata(type=Port, title=None, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | None) – Second port to be connected.

  • euler_fraction (Annotated[float, _Metadata(type=None, title=None, description=None, units=None, required=False, minimum=0, maximum=1, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | 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'], ~photonforge.parametric._Metadata(type=None, title=None, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | None) – Name of the model to be used by default; must be either "Tidy3D" or "Waveguide" (default).

  • technology (Annotated[Technology, _Metadata(type=None, title=None, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | None) – Component technology. If None, the default technology is used.

  • name (Annotated[str, _Metadata(type=None, title=None, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | None) – Component name.

  • tidy3d_model_kwargs (Annotated[dict[str, Any], _Metadata(type=required, title=False, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | None) – Dictionary of keyword arguments passed to the component’s photonforge.Tidy3DModel.

  • waveguide_model_kwargs (Annotated[dict[str, Any], _Metadata(type=required, title=False, description=None, units=None, required=False, minimum=None, maximum=None, exclusive_minimum=None, exclusive_maximum=None, min_items=None, max_items=None)] | 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 = route_s_bend(
    port1=Port((0, 0), 180, "Strip"), port2=Port((20, 5), 0, "Strip"), euler_fraction=0.5
)
route_s_bend