Skip to article frontmatterSkip to article content

gdsfactory.routing.route_quad

gdsfactory.routing.route_quad(component: Component, port1: DPort, port2: DPort, width1: float | None = None, width2: float | None = None, layer: tuple[int, int] | str | int | LayerEnum = 'M1', manhattan_target_step: float | None = None)None

Routes a basic quadrilateral polygon directly between two ports.

Parameters
  • componentComponent to add the route to.

  • port1Port to start route.

  • port2Port objects to end route.

  • width1Width of quadrilateral at ports. If None, uses port widths.

  • width2Width of quadrilateral at ports. If None, uses port widths.

  • layerLayer to put the route on.

  • manhattan_target_stepif not none, min step to manhattanize the polygon

import gdsfactory as gf

c = gf.Component()
pad1 = c << gf.components.pad(size=(50, 50))
pad2 = c << gf.components.pad(size=(10, 10))
pad2.movex(100)
pad2.movey(50)
gf.routing.route_quad(
    c,
    pad1.ports["e2"],
    pad2.ports["e4"],
    width1=None,
    width2=None,
)
c.plot()