# Solder Jet Sizer

Interactive widget for visualizing solder jet paste dot packing on footprint pads. Designed for solder jet printers that deposit individual paste dots (250-800 µm diameter) onto SMD pads.

## What It Does

Given a KiCad footprint (`.kicad_mod`), the Solder Jet Sizer:

1. **Parses pad geometry** — extracts all SMD pads with position, size, shape, and rotation
2. **Renders pads as 2D SVG** — supports rect, roundrect, oval, and circle pad shapes
3. **Overlays solder jet dots** — packs dots into each pad using a grid algorithm
4. **Real-time sliders** — adjust dot diameter (250-800 µm) and inter-dot spacing (0-200 µm)
5. **Stats dashboard** — total dots, avg per pad, area coverage %, center-to-center spacing
6. **Per-pad tooltips** — hover any pad to see its dot layout (cols × rows) and individual coverage

## Key Insight

The widget immediately reveals the **maximum usable dot size** for any footprint. For example, SOT-23 pads are 0.6mm tall — so any dot larger than 600µm won't fit. Drag the slider past this point and dots simply disappear, making the constraint viscerally obvious.

## Coverage Thresholds

| Coverage | Color | Meaning |
|----------|-------|---------|
| ≥ 60% | Green | Good paste coverage |
| ≥ 35% | Yellow | Marginal — may need optimization |
| &lt; 35% | Red | Insufficient paste for reliable joints |

## Dot Packing Algorithm

For each SMD pad:
1. Inset by dot radius from all edges (dots stay within pad boundary)
2. Compute available width/height after inset
3. Calculate grid: `nCols = floor(availW / spacing) + 1`, same for rows
4. Center the grid on the pad
5. Apply pad rotation to dot positions
6. If dot diameter > min(pad width, pad height) → 0 dots fit

## Usage

Ask Claude: *"Run the solder jet sizer on my footprint"* with any `.kicad_mod` file. Or select **Manufacturing → JetSizer** from the AV dropdown for a demo.

Results auto-save to `project-content/solder-jet-sizer/` with both interactive HTML and JSON metadata (including the computed `maxDotForFit` value).

## Interactive Controls

- **Dot diameter slider** — 250 to 800 µm in 10 µm steps
- **Spacing slider** — 0 to 200 µm gap between dots
- **Labels toggle** — show/hide pad numbers
- **Grid toggle** — show/hide 0.5mm background grid
- **Zoom/pan** — mouse wheel + drag
- **Pad tooltips** — hover for per-pad dot count and coverage

## Printer Specs

- Minimum dot: 250 µm (0.25mm)
- Maximum dot: 800 µm (0.80mm)
- These match typical solder jet printer capabilities
