gdsfactory.routing.route_single

Contents

gdsfactory.routing.route_single#

gdsfactory.routing.route_single(component: Component, port1: Port, port2: Port, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, taper: ComponentSpec | None = None, start_straight_length: float = 0.0, end_straight_length: float = 0.0, cross_section: CrossSectionSpec | MultiCrossSectionAngleSpec = 'strip', waypoints: Coordinates | None = None, port_type: str | None = None, allow_width_mismatch: bool = False, radius: float | None = None, route_width: float | None = None) OpticalManhattanRoute[source]#

Returns a Manhattan Route between 2 ports.

The references are straights, bends and tapers. route_single is an automatic version of route_single_from_steps.

Parameters:
  • component – to place the route into.

  • port1 – start port.

  • port2 – end port.

  • bend – bend spec.

  • straight – straight spec.

  • taper – taper spec.

  • start_straight_length – length of starting straight.

  • end_straight_length – length of end straight.

  • cross_section – spec.

  • waypoints – list of points to pass through.

  • port_type – port type to route.

  • allow_width_mismatch – allow different port widths.

  • radius – bend radius. If None, defaults to cross_section.radius.

  • route_width – width of the route. If None, defaults to cross_section.width.

import gdsfactory as gf

c = gf.Component('sample_connect')
mmi1 = c << gf.components.mmi1x2()
mmi2 = c << gf.components.mmi1x2()
mmi2.dmove((40, 20))
gf.routing.route_single(c, mmi1.ports["o2"], mmi2.ports["o1"], radius=5)
c.plot()

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

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