Polyslice includes several browser-based tools for development, testing, and debugging.
A browser-based tool to visualize G-code files in 3D using Three.js. This tool helps with debugging and testing G-code generated by Polyslice (or any other slicer).
- 📊 3D Visualization - View G-code tool paths in interactive 3D
- 🎨 Color-coded movements - Different colors for travel (G0), extrusion (G1), and arc (G2/G3) moves
- 🎮 Orbit controls - Rotate, zoom, and pan to inspect from any angle
- 📈 Statistics - View line counts and movement type breakdowns
- 📁 File upload - Drag and drop any G-code file to visualize
- Open the visualizer in your browser
- Drag and drop a G-code file, or use the file picker
- Use mouse controls to rotate, zoom, and pan:
- Left click + drag: Rotate
- Right click + drag: Pan
- Scroll: Zoom
| Color | Movement Type |
|---|---|
| Blue | Travel moves (G0) |
| Red | Extrusion moves (G1) |
| Green | Clockwise arcs (G2) |
| Yellow | Counter-clockwise arcs (G3) |
See the visualizer documentation for more details.
A simple mini app for experimenting with G-code and writing/reading printer data via Web Serial API.
- 🔌 Serial connection - Connect to your printer via USB or Bluetooth
- 📝 Command input - Send individual G-code commands
- 📤 File upload - Send entire G-code files
- 📥 Response display - View printer responses in real-time
- ⏸️ Pause/Resume - Control file streaming
- Connect your 3D printer via USB
- Click "Connect" and select your printer's serial port
- Enter G-code commands in the input field
- Press Enter or click "Send" to execute
The Web Serial API is supported in:
- Chrome 89+
- Edge 89+
G28 ; Home all axes
M104 S200 ; Set nozzle temperature
M140 S60 ; Set bed temperature
G1 X10 Y10 ; Move to position
M114 ; Report current positionTo run the tools locally:
# Start a local server
npx serve .
# Or use Python
python -m http.server 8000Then open:
- Visualizer:
http://localhost:8000/examples/visualizer/visualizer.html - G-code Sender:
http://localhost:8000/examples/serial/browser/sender.html
- Development Guide - Development setup
- G-code Generation - G-code reference
- G-code Export - Exporting and streaming