pcb_crop
Render a 2D PNG crop of a PCB region around a component reference, net, or explicit coordinates with adjustable margin and layers.
Instructions
Render a 2D PNG crop of a PCB region as ImageContent. Select exactly one target: reference plus margin_mm, net plus margin_mm, or explicit x_mm/y_mm/width_mm/height_mm. Layers default to the target side copper plus silkscreen and Edge.Cuts for reference crops, or all copper plus Edge.Cuts otherwise.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | No | Net name or number to crop around | |
| x_mm | No | Explicit crop origin X in board millimetres | |
| y_mm | No | Explicit crop origin Y in board millimetres | |
| layers | No | Layer names, e.g. ['F.Cu','Edge.Cuts'] | |
| source | Yes | Board name, .kicad_pcb path, or sibling .kicad_sch | |
| width_mm | No | Explicit crop width in millimetres | |
| width_px | No | Long-edge pixel target capped at 1600 | |
| height_mm | No | Explicit crop height in millimetres | |
| margin_mm | No | Margin around reference/net crop | |
| reference | No | Component reference designator to crop around | |
| output_dir | No | PNG output directory; defaults to a temp dir |