Skip to article frontmatterSkip to article content

gdsfactory.routing.add_electrical_pads_shortest

gdsfactory.routing.add_electrical_pads_shortest(component: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.DKCell = 'wire_straight', pad: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.DKCell = 'pad', pad_port_spacing: float = 50.0, pad_size: tuple[float, float] | None = None, select_ports: ~collections.abc.Callable[[...], ~collections.abc.Sequence[~kfactory.port.DPort]] = functools.partial(<function select_ports>, port_type='electrical'), port_names: ~collections.abc.Sequence[str] | None = None, port_orientation: float = 90, layer: tuple[int, int] | str | int | ~kfactory.layer.LayerEnum = 'M3')Component

Returns new Component with a pad by each electrical port.

Parameters
  • componentto route.

  • padpad element or function.

  • pad_port_spacingspacing between pad and port.

  • pad_sizepad size.

  • select_portsfunction to select ports.

  • port_namesoptional port names. Overrides select_ports.

  • port_orientationin degrees.

  • layerfor 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()