gdsfactory.routing.add_electrical_pads_shortest

gdsfactory.routing.add_electrical_pads_shortest#

gdsfactory.routing.add_electrical_pads_shortest(component='wire_straight', pad='pad', pad_port_spacing=50.0, pad_size=None, select_ports=functools.partial(<function select_ports>, port_type='electrical'), port_names=None, port_orientation=90, layer='M3')[source]#

Returns new Component with a pad by each electrical port.

Parameters:
  • component (ComponentSpec) – to route.

  • pad (ComponentSpec) – pad element or function.

  • pad_port_spacing (float) – spacing between pad and port.

  • pad_size (tuple[float, float] | None) – pad size.

  • select_ports (Callable[[...], Sequence[DPort]]) – function to select ports.

  • port_names (Sequence[str] | None) – optional port names. Overrides select_ports.

  • port_orientation (float) – in degrees.

  • layer (LayerSpec) – for the routing.

Return type:

Component

import gdsfactory as gf
c = gf.components.cross(length=100, layer=(49, 0), port_type="electrical")
c = gf.routing.add_electrical_pads_shortest(c, pad_port_spacing=200)
c.plot()

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

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