Skip to article frontmatterSkip to article content

gdsfactory.routing.route_south

gdsfactory.routing.route_south(component: ~gdsfactory.component.Component, component_to_route: ~gdsfactory.component.Component | ~kfactory.instance.DInstance, optical_routing_type: int = 1, excluded_ports: ~collections.abc.Sequence[str] | None = None, straight_separation: float = 4.0, io_gratings_lines: list[list[~kfactory.instance.DInstance]] | None = None, gc_port_name: str = 'o1', bend: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.DKCell = 'bend_euler', straight: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.DKCell = 'straight', select_ports: ~collections.abc.Callable[[...], ~collections.abc.Sequence[~kfactory.port.DPort]] = functools.partial(<function select_ports>, port_type='optical'), port_names: ~collections.abc.Sequence[str] | None = None, cross_section: ~gdsfactory.cross_section.CrossSection | str | dict[str, ~typing.Any] | ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~kfactory.cross_section.SymmetricalCrossSection | ~kfactory.cross_section.DCrossSection = 'strip', start_straight_length: float = 0.5, port_type: str | None = None, allow_width_mismatch: bool = False, auto_taper: bool = True)list[ManhattanRoute]

Places routes to route a component ports to the south.

Parameters
  • componenttop level component to add the routes.

  • component_to_routecomponent or reference to route ports to south.

  • optical_routing_typerouting 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_portslist of port names to NOT route.

  • straight_separationin um.

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

  • gc_port_namegrating coupler port name. Used only if io_gratings_lines is supplied.

  • bendspec.

  • straightspec.

  • select_portsfunction to select_ports.

  • port_namesoptional port names. Overrides select_ports.

  • cross_sectioncross_section spec.

  • start_straight_lengthin um.

  • port_typeoptical or electrical.

  • allow_width_mismatchallow width mismatch.

  • auto_taperauto 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()