gdsfactory.routing.route_ports_to_y

gdsfactory.routing.route_ports_to_y#

gdsfactory.routing.route_ports_to_y(component: Component, ports: Ports | Sequence[Port] | InstancePorts, cross_section: CrossSectionSpec, y: float | Literal['north', 'south'] = 'north', separation: float = 10.0, radius: float = 10.0, x0_left: float | None = None, x0_right: float | None = None, extension_length: float = 0.0, extend_left: float = 0.0, extend_right: float = 0.0, backward_port_side_split_index: int = 0, start_straight_length: float = 0.01, dx_start: float | None = None, dy_start: float | None = None, side: Literal['north', 'south'] = 'north', **routing_func_args: Any) tuple[list[ManhattanRoute], list[Port]][source]#

Route ports to y.

Parameters:
  • component – component to route.

  • ports – reasonably well behaved list of ports. ports facing north ports are norther than any other ports ports facing south ports are souther … ports facing west ports are the wester … ports facing east ports are the easter …

  • cross_section – cross_section to use for routing.

  • y – float or string. if float: y coordinate to which the ports will be routed if string: “north” -> route to north if string: “south” -> route to south

  • separation – in um.

  • radius – in um.

  • x0_left – in um.

  • x0_right – in um.

  • extension_length – in um.

  • extend_left – in um.

  • extend_right – in um.

  • backward_port_side_split_index

    integer this integer represents and index in the list of backwards ports

    (sorted from left to right)

    all ports with an index strictly larger are routed right all ports with an index lower or equal are routed left

  • start_straight_length – in um.

  • dx_start – override minimum starting x distance.

  • dy_start – override minimum starting y distance.

  • side – “north” or “south”.

  • routing_func_args – additional arguments to pass to the routing function.

Returns:

  • a list of Routes

  • a list of the new optical ports

First route the bottom-half of the back ports (back ports are the one facing opposite side of x) Then route the south ports then the front ports then the north ports