# /manufacturing/gerbers

Final production Gerber files for PCB fabrication.

## Purpose
This directory contains the final, production-ready Gerber files that will be sent to your PCB manufacturer. These files define all the copper layers, solder mask, silkscreen, and board outline.

## File Types
- **`.gbr`**: Gerber files for each PCB layer
- **`.gbrjob`**: Gerber job file (KiCad 6+) with layer stack information
- **`.zip`**: Packaged files ready for manufacturer submission

## Standard Gerber Files
```
gerbers/
├── ProjectName-F_Cu.gbr        # Front copper layer
├── ProjectName-B_Cu.gbr        # Back copper layer
├── ProjectName-In1_Cu.gbr      # Inner layer 1 (4+ layer boards)
├── ProjectName-In2_Cu.gbr      # Inner layer 2 (4+ layer boards)
├── ProjectName-F_SilkS.gbr     # Front silkscreen
├── ProjectName-B_SilkS.gbr     # Back silkscreen
├── ProjectName-F_Mask.gbr      # Front solder mask
├── ProjectName-B_Mask.gbr      # Back solder mask
├── ProjectName-F_Paste.gbr     # Front solder paste (SMT)
├── ProjectName-B_Paste.gbr     # Back solder paste (SMT)
├── ProjectName-Edge_Cuts.gbr   # Board outline/edge cuts
├── ProjectName-job.gbrjob      # Gerber job file
└── ProjectName-Gerbers-v1.0.zip # Packaged for submission
```

## Generating Production Gerbers
1. Open your final PCB design (`.kicad_pcb`)
2. **File → Fabrication Outputs → Gerbers**
3. Configure settings:
   - **Output directory**: `manufacturing/gerbers/`
   - **Plot format**: Gerber
   - **Include layers**: All copper, mask, silk, paste, edge cuts
   - **Options**: Check "Use Protel filename extensions" if required
4. Click **Plot**
5. Click **Generate Drill Files** (saves to `/manufacturing/drill/`)

## Quality Control Checklist
- [ ] All required layers present
- [ ] Board outline properly defined
- [ ] No missing copper connections
- [ ] Silkscreen doesn't overlap pads
- [ ] Solder mask openings correct
- [ ] Component references visible and readable
- [ ] Drill holes align with pads
- [ ] File sizes reasonable (not empty or corrupted)

## Manufacturer Requirements
Different manufacturers may require specific settings:
- **File format**: RS-274X (standard)
- **Units**: Millimeters (preferred) or inches
- **Zero suppression**: Leading zeros suppressed
- **Coordinate format**: 3.6 (mm) or 2.5 (inches)
- **Aperture format**: Embedded apertures (standard)

## Pre-submission Verification
1. **Gerber Viewer**: Use KiCad Gerber Viewer or online tools
2. **Layer Stack**: Verify correct layer order
3. **Drill Alignment**: Check drill holes align with pads
4. **Dimensions**: Verify board size and hole sizes
5. **Manufacturer Check**: Use manufacturer's online Gerber viewer

## Common Issues to Avoid
- Missing edge cuts layer
- Incorrect drill file format
- Silkscreen over pads
- Missing solder mask openings
- Incorrect layer naming
- Empty or corrupted files

## Packaging for Submission
Create a ZIP file containing:
- All Gerber files (`.gbr`)
- Gerber job file (`.gbrjob`)
- Drill files (from `/manufacturing/drill/`)
- README with specifications
- BOM (from `/hardware/bom/`)

## File Naming Convention
Following [FILE-NAMING-AND-VERSIONING.md](../../FILE-NAMING-AND-VERSIONING.md) standards:
- `project-name_gerbers_v1.0.0_2024-08-04.zip` - Complete Gerber package
- `project-name_gerber-job_v1.0.0_2024-08-04.gbrjob` - Gerber job file
- `project-name_fabrication-notes_v1.0.0_2024-08-04.txt` - Manufacturing notes

### Individual Layer Files
- `project-name-f-cu_v1.0.0.gbr` - Front copper
- `project-name-b-cu_v1.0.0.gbr` - Back copper
- `project-name-f-silks_v1.0.0.gbr` - Front silkscreen
- `project-name-edge-cuts_v1.0.0.gbr` - Board outline

### Versioning Strategy
- **MAJOR**: PCB layout changes, layer stack changes
- **MINOR**: Component placement changes, routing updates
- **PATCH**: Silkscreen updates, minor corrections
