Cómo iterar los pads de un footprint usando la API Python del plugin KiCAD pcbnew

Iterar los pads de un objeto pcbnew.FOOTPRINT dado usando

iterate_pads_example.py
for pad in list(footprint.Pads()):
    # Ejemplo de qué hacer con [pad]
    print(f"{footprint.GetReference()} {pad.GetNetname()}")

Ejemplo de cómo imprimir todos los pads para todas las huellas (footprints) del board:

iterate_all_footprints_pads.py
for footprint in list(pcbnew.GetBoard().GetFootprints()):
    for pad in list(footprint.Pads()):
        # Ejemplo de qué hacer con [pad]
        print(f"{footprint.GetReference()} {pad.GetNetname()}")

Esto imprimirá, por ejemplo:

example_output.txt
D1 Net-(D1-K)

Echa un vistazo a artículos similares por categoría: KiCad Python