gdsfactory.routing.add_electrical_pads_shortest

gdsfactory.routing.add_electrical_pads_shortest#

gdsfactory.routing.add_electrical_pads_shortest(component: ComponentSpec = functools.partial(<function straight>, cross_section='xs_metal_routing', length=200.0), pad: ComponentSpec = 'pad', pad_port_spacing: float = 50.0, select_ports: ~collections.abc.Callable = functools.partial(<function select_ports>, port_type='electrical'), port_names: tuple[str, ...] | None = None, port_orientation: float = 90, layer: tuple[int, int] | str = 'M3') Component[source]#

Returns new Component with a pad by each electrical port.

Parameters:
  • component – to route.

  • pad – pad element or function.

  • pad_port_spacing – spacing between pad and port.

  • select_ports – function to select ports.

  • port_orientation – in degrees.

  • port_names – optional port names. Overrides select_ports.

  • layer – for the routing.

import gdsfactory as gf
c = gf.components.straight_heater_metal(length=100)
wire_long = gf.components.wire_straight(length=200.)
c = gf.routing.add_electrical_pads_shortest(wire_long)
c.plot()

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

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