How can I script custom PCB edge shapes based on my component layout in KiCad?
Creating custom PCB edge shapes based on component layout can be done using Python scripting in KiCad. The provided script shows how to use arcs to form a unique board edge around the layout of certain components:

```python
import pcbnew
from pcbnew import wxPoint, wxPointMM

def add_line_arc(start, center, angle=90, layer=pcbnew.Edge_Cuts):
    board = pcbnew.GetBoard()
    arc = pcbnew.PCB_SHAPE(board)
    arc.SetShape(pcbnew.SHAPE_T_ARC)
    arc.SetStart(start)
    arc.SetCenter(center)
    arc.SetArcAngleAndEnd(angle * 10, False)
    arc.SetLayer(layer)
    arc.SetWidth(int(0.1 * pcbnew.IU_PER_MM))
    board.Add(arc)

# Script for creating edge shapes
# ... (rest of the script)
add_line_arc(start, center)

pcbnew.Refresh()
```

This method is particularly useful for designing PCBs that need to match specific aesthetic guidelines or fit within unique enclosures, utilizing the positions of components to guide the edge design.