3dSynth

Docs / Custom G-code

Open in the interactive docs reader

Analysis and visualization

The Custom G-code Editor doesn't just display text — it understands the structure, timing, and physics of your G-code. This page covers the analysis and visualization tools that help you understand what a file does before (or after) you print it.

Structural outline

The Outline Panel on the left side of the editor shows a hierarchical tree of your G-code's structure:

File
  Startup          (lines 1–45)
  Layer 0 (Z=0.200) (lines 46–320)
    Skirt
    Perimeter
    Infill
  Layer 1 (Z=0.400) (lines 321–590)
    Perimeter
    Infill
    Support
  ...
  Layer 142 (Z=28.600)
  Shutdown         (lines 28401–28450)

How it works

The structural analyzer detects sections from two sources:

  1. Z-height changes — each time the Z position increases, a new layer begins
  2. Slicer comments — the analyzer reads comment annotations from popular slicers

Supported slicer comment formats

SlicerComment patternExample
Cura;TYPE:, ;LAYER:, ;MESH:;TYPE:WALL-OUTER
PrusaSlicer; TYPE:, ; LAYER_CHANGE; TYPE:Perimeter
OrcaSlicer; TYPE:, ; LAYER_CHANGE; TYPE:Inner wall
Simplify3D; layer, ; process; layer 1, Z = 0.300

You can also define custom section markers:

;--- SECTION: My custom region ---
G1 X10 Y20 E0.5
G1 X30 Y40 E1.0
;--- SECTION: Another region ---

Outline interaction

Each section type has a colored dot matching the Line Type color mode, so you can visually distinguish perimeters from infill from support at a glance.

Metrics panel

The Metrics tab in the dock shows computed statistics about the entire file — or just your selection.

Global metrics

MetricDescriptionExample
Print timeEstimated duration2h 15m 32s
Filament lengthTotal filament used12.45 m
Filament volumeVolumetric usage8.32 cm3
Filament weightWeight (if material density set)10.3 g
LinesTotal / command / comment / blank28,450 / 22,100 / 4,200 / 2,150
LayersNumber of distinct Z heights142
Extrusion distanceTotal movement while extruding45.2 m
Travel distanceTotal non-extrusion movement8.7 m
Travel / extrusion ratioHow much travel vs printing0.19
RetractionsCount and total retraction distance1,240 / 6,200 mm
Avg flowAverage volumetric flow rate4.2 mm3/s
Peak flowMaximum volumetric flow rate12.8 mm3/s
Avg speedAverage feedrate during extrusion2,400 mm/min
Peak speedMaximum feedrate6,000 mm/min

When you configure filamentCostPerKg in your printer settings (under material configuration), the Metrics panel shows an estimated print cost based on the computed filament weight. This updates live as you edit or when you select a portion of the file — so you can see what a specific section costs in material.

For example, with PLA at €25/kg and a print using 42g of filament, the panel shows: Est. Cost: €1.05

Time estimate vs slicer TIME

Print time uses a trapezoid + classic-jerk motion planner (defaults: accel 1000 mm/s², jerk 8 mm/s) and includes G4 dwells. The metrics panel shows naive (distance/feedrate), planned, and slicer ;TIME: / TIME when the file includes that metadata.

Charts

SVG charts (no extra chart library) in the Metrics tab:

Selection-scoped metrics

Select any range of lines (in the editor or by clicking a section in the outline), and the Metrics panel switches to show statistics for just that selection. Sparse 3D brush selections use only the selected line indices, not the min–max span between them. This is useful for answering questions like:

Color modes

The 3D viewer can color-map the toolpath by different machine state properties. Switch modes from the Color dropdown in the toolbar.

ModeColors byGradientWhat it reveals
SpeedFeedrate (F)Blue (slow) to Red (fast)Speed variation across the print
Extrusion rateVolumetric flowBlue (low) to Red (high)Where the printer pushes the most plastic
Volumetric flowVolumetric flowCool to HotFlow with threshold awareness
AccelerationAcceleration settingGreen to Yellow to RedWhere acceleration limits may matter
Line typeSection typeDistinct per typePerimeter vs infill vs support vs travel
TemperatureNozzle targetBlue (cold) to Red (hot)Temperature changes across the print
FanFan speedGray (off) to Cyan (full)Cooling strategy visualization
Layer indexLayer numberRainbow cycleLayer-by-layer progression
BeadExtrusion widthTube radius from estimated widthBead tubes when segment count ≤ 80k; otherwise lines

Playback controls

The playback bar sits between the editor and dock tools. As you play or scrub, the editor scrolls to the current line and the overlay clips with setDrawRange (geometry is not rebuilt every tick). At 1x, playback follows estimated print time (elapsedSeconds).

Controls

ControlAction
SliderDrag to any line in the file
Play/PauseAnimate the nozzle through the toolpath
StopReset to show all lines
Step ForwardJump to next command (skips blanks and comments)
Step BackwardJump to previous command
Speed1x follows estimated print time (elapsedSeconds); 2x–50x scale that clock

Jump-to buttons

Quick navigation to the next event of a specific type:

State display

During playback, the bar shows the current machine state:

X120.5 Y80.2 Z4.200  F2400  E1234.5mm  210°C  Fan 100%  0:14:32

This updates in real time as you scrub or step through the file.

Inspection tooltip

Hover over any toolpath segment in the 3D viewer to see a tooltip with:

Click the segment to select it in the editor and jump to that line.

Hover is off while Brush Select or Measure is active so those tools can use the click.

Measure

Switch the viewport tool to Measure, then click two toolpath hits. The overlay shows straight-line distance (XYZ) between those states. A third click starts a new pair.