Convert CAD files directly to G-code and stream to your 3D printer via WiFi.
3D Print Converter is an open-source solution that bridges the gap between CAD design and 3D printing. Upload DWG, DXF, PDF, or SVG files through a web interface, and the system automatically converts them to G-code and streams directly to your 3D printer.
- Web-Based Interface - Access via
http://3dconverter.localfrom any device - Multiple Input Formats - DWG, DGN, DXF, PDF, SVG, DAT
- Multiple Output Formats - STL, OBJ, STEP, G-code, 3MF
- Direct Printer Control - Stream G-code via UART with real-time progress
- Standalone Operation - ESP32 controller with TFT display
- Low Cost - ~$12 BOM for the controller hardware
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Web Browser │────▶│ ESP32-S3 │────▶│ 3D Printer │
│ (Any Device) │ │ Controller │ │ (UART) │
└─────────────────┘ └────────┬────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Python Server │
│ (Conversion) │
└─────────────────┘
| Component | Description |
|---|---|
| Firmware | ESP32-S3 Arduino code with web server, SD card, TFT display |
| Server | Python FastAPI conversion engine |
| Portable App | Standalone Windows application |
| Enclosure | 3D printable case (OpenSCAD + STL) |
Required Components:
- ESP32-S3-WROOM-1 module
- 2.4" TFT ILI9341 or 1.3" ST7789 display
- MicroSD card slot
- 5V power supply
Wiring:
| Function | GPIO |
|---|---|
| TFT CS | 5 |
| TFT DC | 2 |
| TFT RST | 4 |
| SD CS | 12 |
| Printer TX | 17 |
| Printer RX | 16 |
# Install PlatformIO
pip install platformio
# Build and upload
cd 3d-print-converter/firmware
pio run -t upload# Install dependencies
cd 3d-print-converter/software
pip install -r requirements.txt
# Start server
python server.py --host 0.0.0.0 --port 8000- Connect to ESP32 WiFi AP (
3DConverter) or configure your network - Open
http://3dconverter.localin your browser - Upload a CAD file
- Click Convert → Print
Input File (DWG/PDF/DXF/SVG)
│
▼
┌───────────────────────────────┐
│ Stage 1: Format Detection │
└───────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ Stage 2: DXF Normalization │
│ - ODA Converter (DWG/DGN) │
│ - Inkscape (PDF→SVG→DXF) │
│ - ezdxf (native DXF) │
└───────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ Stage 3: 2D→3D Conversion │
│ - Profile extrusion │
│ - Polygon generation │
└───────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ Stage 4: Mesh Processing │
│ - Repair & validation │
│ - Scale & center │
└───────────────────────────────┘
│
▼
┌───────────────────────────────┐
│ Stage 5: G-code Generation │
│ - PrusaSlicer (primary) │
│ - Built-in slicer (fallback) │
└───────────────────────────────┘
│
▼
Output (G-code) → Printer
| Method | Endpoint | Description |
|---|---|---|
| GET | /status |
System health and tool availability |
| POST | /api/convert |
Synchronous conversion (streaming response) |
| POST | /api/convert/async |
Async conversion (returns job ID) |
| GET | /api/jobs/{id} |
Check job status |
| GET | /api/jobs/{id}/download |
Download converted file |
| GET | /api/formats |
List supported formats |
curl -X POST http://localhost:8000/api/convert \
-F "file=@drawing.dxf" \
-F "output_format=gcode" \
-F "extrusion_height=10" \
-F "layer_height=0.2"| Parameter | Default | Description |
|---|---|---|
extrusion_height |
10.0 mm | Height for 2D→3D extrusion |
scale_factor |
1.0 | Model scaling |
layer_height |
0.2 mm | Slicer layer height |
nozzle_diameter |
0.4 mm | Printer nozzle size |
print_speed |
50 mm/s | Print movement speed |
infill_percentage |
20% | Interior fill density |
bed_size |
220x220x250 | Print volume (mm) |
For full format support, install these optional tools:
| Tool | Purpose | Required For |
|---|---|---|
| ODA File Converter | DWG/DGN support | .dwg, .dgn files |
| Inkscape | PDF conversion | .pdf files |
| FreeCAD | STEP export | .step output |
| PrusaSlicer | G-code generation | Better slicing quality |
| Part | Quantity | Est. Cost |
|---|---|---|
| ESP32-S3-WROOM-1 | 1 | $4.00 |
| 2.4" TFT ILI9341 | 1 | $4.00 |
| MicroSD Module | 1 | $1.00 |
| AMS1117 3.3V Regulator | 1 | $0.50 |
| USB-C Connector | 1 | $0.50 |
| PCB + Misc | 1 | $2.50 |
| Total | ~$12.50 |
3d-print-converter/
├── firmware/
│ ├── src/main.cpp # ESP32 firmware (1300+ lines)
│ └── platformio.ini # Build configuration
│
├── software/
│ ├── converter_engine.py # Conversion pipeline
│ ├── server.py # FastAPI REST server
│ └── requirements.txt # Python dependencies
│
├── enclosure/
│ ├── *.scad # OpenSCAD source files
│ └── stl/ # Ready-to-print STL files
│
├── portable-app/ # Standalone Windows app
│
└── build-exe/ # Windows executable
└── dist/3D-Print-Converter.exe
- Check credentials in web config portal
- Try AP mode: connect to
3DConverternetwork, access192.168.4.1
- Verify Python server is running on port 8000
- Check server logs for missing tools (ODA, Inkscape)
- Ensure input file is valid (try opening in original CAD software)
- Verify UART wiring (TX→RX, RX→TX)
- Check baud rate matches printer (default: 115200)
- Ensure printer firmware supports standard G-code (Marlin compatible)
Contributions are welcome! Please feel free to submit issues and pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ezdxf - DXF file handling
- trimesh - 3D mesh processing
- PrusaSlicer - G-code generation
- TFT_eSPI - ESP32 display driver
Made with ⚙️ by murbati91