rectangular_spiral

photonforge.parametric.rectangular_spiral(*, port_spec=None, turns=None, radius=None, separation=None, size=None, full_length=None, align_ports=None, active_model=None, technology=None, name=None, bend_kwargs=None, straight_kwargs=None, tidy3d_model_kwargs=None, circuit_model_kwargs=None)

Rectangular spiral.

Parameters:
  • port_spec (str | PortSpec) – Port specification describing waveguide cross-section.

  • turns (int) – Number of turns in each of the 2 spiral arms.

  • radius (float) – Bend radius for the spiral turns.

  • separation (float) – Distance between waveguide centers in parallel sections. If None, defaults to the port width.

  • size (tuple[float]) – Spiral dimensions measured from the waveguide centers. If None, defaults to (0, 0).

  • full_length (float) – Desired spiral length. If set to a positive value, ‘turns’ and ‘size[1]’ are calculated automatically.

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

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

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

  • name (str) – Component name.

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

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

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

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

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 = rectangular_spiral(
    port_spec="Strip", radius=5, turns=7, bend_kwargs={"euler_fraction": 0.5}
)

# Horizontally aligned ports
component2 = 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 = 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