Skip to content

Latest commit

 

History

History
96 lines (67 loc) · 2.89 KB

File metadata and controls

96 lines (67 loc) · 2.89 KB

Tools

Polyslice includes several browser-based tools for development, testing, and debugging.

G-code Visualizer

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).

Open G-code Visualizer

Features

  • 📊 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

Usage

  1. Open the visualizer in your browser
  2. Drag and drop a G-code file, or use the file picker
  3. Use mouse controls to rotate, zoom, and pan:
    • Left click + drag: Rotate
    • Right click + drag: Pan
    • Scroll: Zoom

Color Legend

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.

Web G-code Sender

A simple mini app for experimenting with G-code and writing/reading printer data via Web Serial API.

Open Web G-code Sender

Features

  • 🔌 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

Usage

  1. Connect your 3D printer via USB
  2. Click "Connect" and select your printer's serial port
  3. Enter G-code commands in the input field
  4. Press Enter or click "Send" to execute

Browser Compatibility

The Web Serial API is supported in:

  • Chrome 89+
  • Edge 89+

Common Commands

G28        ; Home all axes
M104 S200  ; Set nozzle temperature
M140 S60   ; Set bed temperature
G1 X10 Y10 ; Move to position
M114       ; Report current position

Local Development

To run the tools locally:

# Start a local server
npx serve .

# Or use Python
python -m http.server 8000

Then open:

  • Visualizer: http://localhost:8000/examples/visualizer/visualizer.html
  • G-code Sender: http://localhost:8000/examples/serial/browser/sender.html

Related Documentation