route_u¶
- photonforge.parametric.route_u(*, port1=None, port2=None, radius=None, u_offset=None, relative=None, pitch=None, bend=None, straight_kwargs=None, technology=None, name=None, route_model=None, bundle_model=None)[source]¶
Route the connection between parallel ports.
- Parameters:
port1 (Port | tuple[Reference, str] | tuple[Reference, str, int] | Sequence[Port | tuple[Reference, str] | tuple[Reference, str, int]] | None) – First port to be connected. The port can be specified as a
photonforge.Portor as a tuple including aphotonforge.Reference, the port name, and the repetition index (optional, only for array references). A sequence of ports can be used for bundle routing.port2 (Port | tuple[Reference, str] | tuple[Reference, str, int] | Sequence[Port | tuple[Reference, str] | tuple[Reference, str, int]] | None) – Second port to be connected. A sequence of ports can be used for bundle routing (with same length as
port1).radius (Annotated[float, exclusiveMinimum=0, units='μm'] | None) – Radius used for bends, if needed.
u_offset (Annotated[float, units='μm'] | None) – Position of the base of the U shape.
relative (bool | None) – If
True, interpretu_offsetrelative to the frontmost port.pitch (Annotated[float, minimum=0, units='μm'] | None) – Center-to-center distance between adjacent waveguides in a bundle. If
None, the largest snapped port width is used.bend (Component | Sequence[Component] | None) – 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 (Annotated[dict[str, Any], _] | None) – Keyword arguments for
straight().technology (Technology | None) – Component technology. If
None, the default technology is used.name (str | None) – Component name.
route_model (Model | None) – Model to be used with each route sub-component. If
Noneaphotonforge.CircuitModelis used.bundle_model (Model | None) – Model to be used with the top-level route component. If
Noneaphotonforge.CircuitModelis used.
- Returns:
Component with the route, including ports and model.
- Return type:
ports1 = [pf.Port((0, 10), 0, "Rib"), pf.Port((-10, 0), 0, "Strip"), pf.Port((-15, -5), 0, "Strip")]
ports2 = [pf.Port((0, 65), 0, "Rib"), pf.Port((0, 70), 0, "Strip"), pf.Port((0, 75), 0, "Strip")]
component = pf.parametric.route_u(
port1=ports1, port2=ports2, radius=10, u_offset=30, relative=True, pitch=5
)