Skip to content

parametric.route_z

route_z(
*,
port1: photonforge.Port
| tuple[photonforge.Reference, str]
| tuple[photonforge.Reference, str, int]
| collections.abc.Sequence[
photonforge.Port
| tuple[photonforge.Reference, str]
| tuple[photonforge.Reference, str, int]
]
| None = None,
port2: photonforge.Port
| tuple[photonforge.Reference, str]
| tuple[photonforge.Reference, str, int]
| collections.abc.Sequence[
photonforge.Port
| tuple[photonforge.Reference, str]
| tuple[photonforge.Reference, str, int]
]
| None = None,
radius: Annotated[float, exclusiveMinimum=0, units='μm'] | None = None,
alignment: Literal['center', 'port1', 'port2'] | None = None,
padding: Annotated[float, minimum=0, units='μm']
| Annotated[
collections.abc.Sequence[Annotated[float, minimum=0, units='μm']],
maxItems=2,
minItems=2,
]
| None = None,
pitch: Annotated[float, minimum=0, units='μm'] | None = None,
bend: photonforge.Component
| collections.abc.Sequence[photonforge.Component]
| None = None,
straight_kwargs: Annotated[dict[str, Any], _] | None = None,
s_bend_kwargs: Annotated[dict[str, Any], _] | None = None,
technology: photonforge.Technology | None = None,
name: str | None = None,
route_model: photonforge.Model | None = None,
bundle_model: photonforge.Model | None = None,
) -> photonforge.Component

Route the connection between parallel ports.

Args

  • port1: First port to be connected. The port can be specified as a Port or as a tuple including a Reference, the port name, and the repetition index (optional, only for array references). A sequence of ports can be used for bundle routing.
  • port2: Second port to be connected. A sequence of ports can be used for bundle routing (with same length as port1).
  • radius: Radius used for bends, if needed.
  • alignment: Alignment of the transversal route section. One of "center", "port1", or "port2". If None, defaults to "center".
  • padding: Minimal straight length added before bends. Use 2 values to set different paddings for ports 1 and 2. Affects alignment.
  • pitch: Center-to-center distance between adjacent waveguides in a bundle. If None, the largest snapped port width is used.
  • bend: 90° bend to be used for routing. If the bundle has different port specifications, a sequence of bends (one for each specification) must be provided. If None, the default parametric bend will be used.
  • straight_kwargs: Keyword arguments for straight.
  • s_bend_kwargs: Keyword arguments for s_bend.
  • technology: Component technology. If None, the default technology is used.
  • name: Component name.
  • route_model: Model to be used with each route sub-component. If None a CircuitModel is used.
  • bundle_model: Model to be used with the top-level route component. If None a CircuitModel is used.

Returns

Component with the route, including ports and model.

Example

>>> ports1 = [
... pf.Port((0, 0), 180, "Strip"),
... pf.Port((0, 12), 180, "Strip"),
... pf.Port((0, 30), 180, "Rib"),
... pf.Port((0, 55), 180, "Strip"),
... pf.Port((0, 60), 180, "Rib"),
... pf.Port((0, 90), 180, "Strip"),
... pf.Port((0, 95), 180, "Strip"),
... ]
>>> ports2 = [
... pf.Port((100, 25), 0, "Strip"),
... pf.Port((100, 30), 0, "Strip"),
... pf.Port((100, 34), 0, "Rib"),
... pf.Port((100, 38), 0, "Strip"),
... pf.Port((100, 60), 0, "Rib"),
... pf.Port((100, 65), 0, "Strip"),
... pf.Port((100, 70), 0, "Strip"),
... ]
>>> component = pf.parametric.route_z(port1=ports1, port2=ports2, pitch=5, radius=10)

route_z