BACK TO LEARNING HUB
Tutorial 6 Min Read New Feature

Inspect Your G-code Before You Press Print

L 138 / 240
G-code Inspector

Walls, infill, and travel — every layer, before the printer sees it

Your slicer's preview is only as honest as your slicer. A travel move it conveniently hides shows up as a string on the print.

The MegaSlicer Pro G-code Inspector parses any sliced .gcode file in your browser and shows what the printer will actually do — toolpath by toolpath, layer by layer.

📥

Drop the File

Drag a .gcode file onto the page. Nothing is uploaded — the parser runs locally and reads every move. In the summary panel you get:

  • Total filament length and weight in grams.
  • Estimated print time (parsed from M73 markers and feedrate analysis).
  • Layer count and bounding box.
  • Detected slicer brand — PrusaSlicer, Cura, Bambu Studio, OrcaSlicer, or SuperSlicer.

The slicer detection alone is worth the click: if a teammate handed you a file with no profile context, you now know which app produced it before you start tweaking.

💷

Cost in Pounds (or Anything Else)

Set Spool Price and Spool Weight in the right-hand panel and the inspector calculates the exact material cost of this job. Defaults are £22 for 1000 g, but if you are running premium silk PLA, bump the price — the cost field updates instantly. The number it returns is grounded in the actual extruded length, not the slicer's preview estimate, which can drift by 5–10%.

🎚️

The Layer Slider

Drag the Layer slider from 0 to the layer count. The 2D preview redraws to show that layer's toolpath, with each move type colour-coded:

Cyan — Outer Wall

The first thing the printer extrudes on each layer; the cleanest visible surface.

Green — Infill

Internal lattice. Density and pattern are visible at a glance — sparse gyroid looks very different from 40% grid.

Amber — Travel Moves

Non-extruding hops between segments. Too many or too long means stringing risk on temperature-sensitive filaments.

What to Look For

Scrub the slider through the first 5 layers and the last 5 layers. First layers should be solid — gaps mean a brim/skirt issue. Last layers should be smooth — visible travel moves there mean the slicer is hopping over top surfaces, which leaves zits. Both problems are easier to fix in the slicer than to sand off the print.

⏱️

Sanity-Check Long Prints

Before committing 60+ hours to a print, the inspector's exact gram count is more reliable than your slicer's estimate. If the filament weight exceeds 80% of your spool weight, swap to a fresh spool now — mid-print runouts on giant prints almost always end the job.

A second cheap check: if the layer count is far higher than expected, the slicer has probably picked the wrong layer height for the profile you thought you loaded. Better to find out from the inspector than from a 30-hour clock you cannot pause.

🔗

Pair It With the Rest of the Workflow

The inspector is the last gate before the SD card. Earlier in the pipeline:

  • Run the STL through the STL Doctor first to catch non-manifold edges that confuse the slicer.
  • Pick a stance with the Orientation Optimizer so the .gcode you inspect is already the cheapest one to print.
  • If something still looks off in the layer preview, the Failure Diagnoser maps visible symptoms back to the slicer setting that caused them.

Look Before You Print.

Drop the .gcode, scrub the slider, and catch the surprise before the printer does.