Skip to article frontmatterSkip to article content

gdsfactory.routing.route_ports_to_x

gdsfactory.routing.route_ports_to_x(component: Component, ports: Ports, cross_section: CrossSectionSpec, x: float | Literal['east', 'west'] = 'east', separation: float = 10.0, radius: float = 10.0, extend_bottom: float = 0.0, extend_top: float = 0.0, extension_length: float = 0.0, y0_bottom: float | None = None, y0_top: float | None = None, 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['east', 'west'] = 'east', **routing_func_args: Any)tuple[list[ManhattanRoute], list[typings.Port]]

Returns route to x.

Parameters
  • componentcomponent to route.

  • portsreasonably 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_sectioncross_section to use for routing.

  • xfloat or string. if float: x coordinate to which the ports will be routed if string: “east” -> route to east if string: “west” -> route to west

  • separationin um.

  • radiusin um.

  • extend_bottomin um.

  • extend_topin um.

  • extension_lengthin um.

  • y0_bottomin um.

  • y0_topin um.

  • backward_port_side_split_indexinteger represents and index in the list of backwards ports (bottom to top) all ports with an index strictly lower or equal are routed bottom all ports with an index larger or equal are routed top.

  • start_straight_lengthin um.

  • dx_startoverride minimum starting x distance.

  • dy_startoverride minimum starting y distance.

  • side“east” or “west”.

  • routing_func_argsadditional arguments to pass to the routing function.

Returns

list of routes ports: list of the new optical ports

Return type

routes

  1. routes the bottom-half of the ports facing opposite side of x

  2. routes the south ports

  3. front ports

  4. north ports