straight

photonforge.parametric.straight(*, port_spec=None, length=None, bulge_width=None, bulge_taper_length=None, bulge_margin=None, active_model=None, technology=None, name=None, tidy3d_model_kwargs=None, waveguide_model_kwargs=None)[source]

Straight waveguide section.

Parameters:
  • port_spec (Annotated[str | PortSpec, _] | None) – Port specification describing waveguide cross-section.

  • length (Annotated[float, exclusiveMinimum=0, units='μm'] | None) – Section length.

  • bulge_width (Annotated[float, units='μm'] | None) – Width added to the waveguide cross-section in the central region when length if enough to fit in 2 tapering sections plus margins. If None, defaults to 0.

  • bulge_taper_length (Annotated[float, minimum=0, units='μm'] | None) – Length of each tapering region for bulging the central region of the waveguide. If None, defaults to 0.

  • bulge_margin (Annotated[float, minimum=0, units='μm'] | None) – Length of the waveguide that must be kept without bulging at both ends. 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 straight section, ports and model.

Return type:

Component

component1 = pf.parametric.straight(port_spec="Rib", length=10)

component2 = pf.parametric.straight(
    port_spec="Strip",
    length=12,
    bulge_width=0.4,
    bulge_taper_length=3,
    bulge_margin=1,
    tidy3d_model_kwargs={"symmetry": (0, -1, 0)},
    active_model="Tidy3D",
)
straight