rectangular_spiral

photonforge.parametric.rectangular_spiral(*, port_spec, turns, radius=None, separation=0, size=(0, 0), align_ports='', active_model='Circuit', technology=None, name='', bend_kwargs={}, straight_kwargs={}, tidy3d_model_kwargs={}, circuit_model_kwargs={})

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 | None) – Bend radius for the spiral turns.

  • separation (float) – Distance between waveguide centers in parallel sections.

  • size (tuple[float, float]) – Spiral dimensions measured from the waveguide centers.

  • 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".

  • 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 the straight section, ports and model.

Return type:

Component

Note

The full length of the spiral can be computed by summing all path lengths from the main component’s references, assuming the paths in the specified layer have no offsets: sum(r.component.structures[layer][0].length() for r in spiral.references))

# 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, bend_kwargs={"euler_fraction": 0.5}, align_ports="y"
)

# Vertically aligned ports, predefined length
component3 = rectangular_spiral(
    port_spec="Strip",
    radius=5,
    turns=7,
    bend_kwargs={"euler_fraction": 0.5},
    align_ports="x",
    size=(75, 0),
)
rectangular_spiral