gdsfactory.routing.route_quad

Contents

gdsfactory.routing.route_quad#

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

Routes a basic quadrilateral polygon directly between two ports.

Parameters:
  • port1 – Port to start route.

  • port2 – Port objects to end route.

  • width1 – Width of quadrilateral at ports. If None, uses port widths.

  • width2 – Width of quadrilateral at ports. If None, uses port widths.

  • layer – Layer to put the route on.

  • manhattan – if 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)
route_gnd = c << gf.routing.route_quad(
    pad1.ports["e2"],
    pad2.ports["e4"],
    width1=None,
    width2=None,
)
c.show()
c.plot()

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

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