---
estimated_steps: 10
estimated_files: 5
skills_used: []
---

# T02: Output format generators: DXF (AC1015+), JSON, SVG

1. Create engine/output/dxf.py
2. Generate AC1015+ DXF format:
   - Use ezdxf library (Python-native, well-maintained)
   - Convert SVG path data to DXF LWPOLYLINE/SPLINE entities
   - Handle bezier curves → polyline approximation
   - Proper island/counter-path nesting
3. Create engine/output/json_output.py
4. JSON format: array of path objects with bezier/polyline commands
5. Update engine/output/svg.py for clean SVG serialization
6. Test DXF output opens in Inkscape (if available) or validate structure

## Inputs

- `engine/pipeline/postprocess.py`

## Expected Output

- `engine/output/dxf.py`
- `engine/output/json_output.py`
- `engine/output/svg.py`

## Verification

cd engine && python -m pytest tests/test_output.py -v
