Is it possible to automate the creation of custom NPTH pads in PCB layouts using Python in KiCad?
Yes, automating the creation of custom NPTH pads in PCB layouts is possible using Python in KiCad. The provided script snippet shows how to create a custom footprint and then add a non-plated through-hole pad to it with defined characteristics like size, shape, and drill size:

```python
import pcbnew

# Script to automate NPTH pad creation
board = pcbnew.GetBoard()
module = pcbnew.FOOTPRINT(board)
module.SetPosition(pcbnew.wxPointMM(x, y))
board.Add(module)

# Configure an NPTH pad
pcb_pad = pcbnew.PAD(module)
# ... (configure NPTH pad settings)
module.Add(pcb_pad)
```

This method is particularly useful for quickly generating custom NPTH pads in a PCB design, facilitating efficient design processes for specialized mechanical or alignment features.