rectangular_spiral

photonforge.parametric.rectangular_spiral(*, port_spec=None, turns=None, radius=None, separation=None, size=None, full_length=None, align_ports=None, technology=None, name=None, model=None, straight_kwargs=None, bend_kwargs=None)[source]

Rectangular spiral.

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

  • turns (Annotated[int, minimum=2] | None) – Number of turns in each of the 2 spiral arms.

  • radius (Annotated[float, exclusiveMinimum=0, units='μm'] | None) – Bend radius for the spiral turns.

  • separation (Annotated[float, minimum=0, units='μm'] | None) – Distance between waveguide centers in parallel sections. If None, defaults to the port width.

  • size (Annotated[Sequence[Annotated[float, minimum=0, units='μm']], maxItems=2, minItems=2] | None) – Spiral dimensions measured from the waveguide centers. If None, defaults to (0, 0).

  • full_length (Annotated[float, exclusiveMinimum=0, units='μm']) – Desired spiral length. If set to a positive value, ‘turns’ and ‘size[1]’ are calculated automatically.

  • align_ports (Literal['', 'x', 'y'] | None) – Optionally align ports to have centers with same "x" or "y" coordinates.

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

  • name (str | None) – Component name.

  • model (Model | None) – Model to be used with this component. If None a photonforge.CircuitModel is used.

  • straight_kwargs (Annotated[dict[str, Any], _] | None) – Dictionary of keyword arguments for straight().

  • bend_kwargs (Annotated[dict[str, Any], _] | None) – Dictionary of keyword arguments for bend().

Returns:

Component with path sections, ports and model.

Return type:

Component

Note

The full length of the spiral can be computed with the photonforge.route_length() function.

# Compact spiral
component1 = pf.parametric.rectangular_spiral(
    port_spec="Strip", radius=5, turns=7, bend_kwargs={"euler_fraction": 0.5}
)

# Horizontally aligned ports
component2 = pf.parametric.rectangular_spiral(
    port_spec="Strip", radius=5, turns=7, align_ports="y", bend_kwargs={"euler_fraction": 0.5}
)

# Vertically aligned ports, predefined length, bulging straight sections
component3 = pf.parametric.rectangular_spiral(
    port_spec="Strip",
    radius=5,
    full_length=500,
    size=(75, 0),
    align_ports="x",
    bend_kwargs={"euler_fraction": 0.5},
    straight_kwargs={"bulge_width": 0.7, "bulge_taper_length": 10, "bulge_margin": 2},
)
rectangular_spiral