gdsfactory.routing.add_electrical_pads_shortest

gdsfactory.routing.add_electrical_pads_shortest#

gdsfactory.routing.add_electrical_pads_shortest(component: ComponentSpec = 'wire', pad: ComponentSpec = 'pad', pad_port_spacing: float = 50.0, pad_size: tuple[float, float] = (100.0, 100.0), select_ports: ~collections.abc.Callable[[...], ~collections.abc.Sequence[~kfactory.kcell.Port]] = functools.partial(<function select_ports>, port_type='electrical'), port_names: ~collections.abc.Sequence[str] | None = None, port_orientation: float = 90, layer: LayerSpec = '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.

  • pad_size – pad size.

  • select_ports – function to select ports.

  • port_names – optional port names. Overrides select_ports.

  • port_orientation – in degrees.

  • layer – for the routing.

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