gdsfactory.routing.route_south

Contents

gdsfactory.routing.route_south#

gdsfactory.routing.route_south(component: ~gdsfactory.component.Component, component_to_route: ~gdsfactory.component.Component | ~gdsfactory.component.ComponentReference, optical_routing_type: int = 1, excluded_ports: tuple[str, ...] | None = None, straight_separation: float = 4.0, io_gratings_lines: list[list[~gdsfactory.component.ComponentReference]] | None = None, gc_port_name: str = 'o1', bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, select_ports: ~collections.abc.Callable = functools.partial(<function select_ports>, port_type='optical'), port_names: ~collections.abc.Sequence[str] | None = None, cross_section: CrossSectionSpec = <function strip>, start_straight_length: float = 0.5, port_type: str | None = None, allow_width_mismatch: bool = False, auto_taper: bool = True) list[ManhattanRoute][source]#

Places routes to route a component ports to the south.

Parameters:
  • component – top level component to add the routes.

  • component_to_route – component or reference to route ports to south.

  • optical_routing_type – routing heuristic 1 or 2 1: uses the component size info to estimate the box size. 2: only looks at the optical port positions to estimate the size.

  • excluded_ports – list of port names to NOT route.

  • straight_separation – in um.

  • io_gratings_lines – list of ports to which the ports produced by this function will be connected. Supplying this information helps avoiding straight collisions.

  • gc_port_name – grating coupler port name. Used only if io_gratings_lines is supplied.

  • bend – spec.

  • straight – spec.

  • select_ports – function to select_ports.

  • port_names – optional port names. Overrides select_ports.

  • cross_section – cross_section spec.

  • start_straight_length – in um.

  • port_type – optical or electrical.

  • allow_width_mismatch – allow width mismatch.

  • auto_taper – auto taper.

Works well if the component looks roughly like a rectangular box with:

north ports on the north of the box. south ports on the south of the box. east ports on the east of the box. west ports on the west of the box.

import gdsfactory as gf

c = gf.Component()
ref = c << gf.components.ring_double()
r = gf.routing.route_south(c, ref)
c.plot()

(Source code, png, hires.png, pdf)

../_images/gdsfactory-routing-route_south-1.png