gdsfactory.routing.add_electrical_pads_top#
- gdsfactory.routing.add_electrical_pads_top(component, direction='top', spacing=(0.0, 100.0), pad_array='pad_array', select_ports=functools.partial(<function select_ports>, port_type='electrical'), port_names=None, layer='MTOP', **kwargs)[source]#
Returns new component with electrical ports connected to top pad array.
- Parameters:
component (ComponentSpec) – to route.
direction (Literal['top', 'right']) – sets direction of the array (top or right).
spacing (tuple[float, float]) – component to pad spacing.
pad_array (ComponentSpec) – function for pad_array.
select_ports (Callable[[...], Sequence[DPort]]) – function to select electrical ports.
port_names (Sequence[str] | None) – optional port names. Overrides select_ports.
layer (LayerSpec) – for the routes.
kwargs (Any) – additional arguments.
- Keyword Arguments:
ports – Dict[str, Port] a port dict {port name: port}.
prefix – select ports with port name prefix.
suffix – select ports with port name suffix.
orientation – select ports with orientation in degrees.
width – select ports with port width.
layers_excluded – List of layers to exclude.
port_type – select ports with port type (optical, electrical, vertical_te).
clockwise – if True, sort ports clockwise, False: counter-clockwise.
- Return type:
import gdsfactory as gf c = gf.components.wire_straight(length=200.) cc = gf.routing.add_electrical_pads_top(component=c, spacing=(-150, 30)) cc.plot()
(
Source code
,png
,hires.png
,pdf
)