How can I use Python to add non-plated through-hole (NPTH) pads to my PCB in KiCad?
Adding non-plated through-hole (NPTH) pads to a PCB in KiCad can be done using Python scripting. The script snippet provided demonstrates how to create a new footprint, set its position, and add an NPTH pad to it with specific attributes like size, shape, and drill size:

```python
import pcbnew

# Initialize PCB and create a new footprint
board = pcbnew.GetBoard()
module = pcbnew.FOOTPRINT(board)
module.SetPosition(pcbnew.wxPointMM(x, y))
board.Add(module)

# Create and configure an NPTH pad
pcb_pad = pcbnew.PAD(module)
# ... (set NPTH pad properties)
module.Add(pcb_pad)
```

This approach is useful for creating custom footprints with NPTH pads, particularly when specific mechanical features or alignment holes are required in the PCB design.