3dSynth

Docs / Custom G-code

Open in the interactive docs reader

Getting started with Custom G-code

This tutorial walks you through the Custom G-code Editor from first launch to editing a real G-code file. Follow along step by step — no prior G-code editing experience required.

Step 1: Choose Custom G-code

From the empty canvas (or after removing a current module), you'll see the module picker. Click Custom G-code to create a new G-code editing module.

The editor opens with an empty canvas — a toolbar at the top, an outline panel on the left, and the Monaco code editor in the center.

Step 2: Import a G-code file

Click the Import button in the toolbar to open a file dialog. Select any .gcode file from your slicer (Cura, PrusaSlicer, OrcaSlicer, Simplify3D — all supported).

The file loads into the editor, and several things happen automatically:

Step 3: Explore the interface

Take a moment to orient yourself:

Step 4: Navigate with the outline

Click any section in the outline panel. Three things happen simultaneously:

  1. The editor scrolls to that section's starting line
  2. The lines in that section are highlighted in the editor
  3. The corresponding toolpath is highlighted in the 3D viewer

Try clicking different layers to jump around the file. Expand a layer to see its sub-regions (Perimeter, Infill, Support) and click those to zoom in to specific parts of the print.

Step 5: Read the metrics

Switch to the Metrics tab in the dock to see the global file statistics:

Print Time:        2h 15m 32s
Filament Length:   12.45 m
Filament Volume:   8.32 cm3
Layers:            142
Avg Flow:          4.2 mm3/s
Peak Flow:         12.8 mm3/s
Retractions:       1,240

Now select a range of lines in the editor (click and drag, or click a section in the outline). The metrics panel switches to show selection-scoped statistics for just that range. This is a fast way to answer "how long does this layer take?" or "what's the flow rate in this section?"

Step 6: Change the color mode

In the toolbar, find the Color dropdown (defaults to "Speed"). Try switching to different modes:

Each mode reveals different aspects of the print. Speed mode is particularly useful for finding sections where the slicer set unusually high or low feedrates.

Step 7: Modify speed on a selection

Let's make a targeted edit. Suppose layer 3 has a tricky overhang and you want to slow it down:

  1. Click Layer 3 in the outline panel
  2. In the Precision Tools section, find Speed
  3. Type 0.7 in the multiplier field (70% of current speed)
  4. Click Apply

All F (feedrate) parameters in that layer are now multiplied by 0.7. Check the metrics panel to see how the estimated time changed.

If you don't like the result, press Ctrl+Z to undo.

Step 8: Create a snapshot

Before making bigger changes, save your current state:

  1. Switch to the Snapshots tab in the dock
  2. Type a name: "After speed tweak on layer 3"
  3. Click Save

The snapshot appears in the list with a timestamp and line count. You can restore this exact version at any time by clicking Restore, or open Diff to compare the snapshot with the current editor in a side-by-side Monaco diff.

Step 9: Use the debugger

The debugger lets you step through the G-code like a programmer steps through code:

  1. Open the Debugger panel
  2. Click Step Forward to advance one command at a time
  3. Watch the machine state update: position, temperature, fan speed, extrusion
  4. The 3D viewer shows a yellow nozzle indicator at the current position

Try these workflows:

Setting breakpoints

If you want the debugger to pause at specific lines during playback:

  1. Navigate to the line of interest
  2. Click Add BP in the debugger panel
  3. The line number appears as a red badge
  4. During playback, execution pauses automatically at that line

Step 10: Export the edited G-code

When your edits are complete:

  1. Use the standard 3dSynth export flow (Export button in the top bar)
  2. The modified G-code is saved as a .gcode file
  3. Load it into your printer's SD card or send it via OctoPrint, Mainsail, or your preferred interface

Next steps