What this viewer shows you
Drop a program in and you get the toolpath drawn in 3D. Rapid moves are drawn in a faded copper and cutting moves in near-black, which is the quickest way to spot the mistake everyone worries about, a rapid that goes straight through the part or the fixture.
You also get the travel in each axis, so you can check the program fits inside your machine and inside your workholding before you cut anything.
What it reads
- Straight moves, both rapid and feed, meaning
G0andG1. - Arcs, meaning
G2andG3, given either by I, J and K centre offsets or by a radius R, including helical moves where the tool spirals down while it goes round. A negative R is read as the arc of more than 180 degrees, the way the control reads it. - Arc planes, meaning
G17,G18andG19, so an arc cut in the XZ or YZ plane is drawn in that plane and turns the way the control turns it. - Canned cycles
G73,G74,G76andG81toG89. Each hole is drawn as the control moves: a rapid across to the hole, a rapid down to the R plane, a feed into the hole to the Z depth, and a return to the R plane withG99or to the starting height withG98. The peck drilling cyclesG73andG83show every peck set by Q, andG80ends the cycle. - Inch and millimetre programs, meaning
G20andG21, converted to millimetres for display. - Absolute and incremental positioning, meaning
G90andG91. - Feed rates, spindle speeds and tool numbers, which are reported so you can sanity check them at a glance.
What it does not do
The viewer draws where the tool centre goes. It does not know your tool diameter or remove material, so it cannot warn you that you are about to crash into a vise it cannot see. It does not apply cutter compensation or follow subprogram calls and macros. Inside a drilling cycle it leaves out the dwell and the spindle orientation at the bottom of the hole. A program does not say where the tool is before its first move, so the viewer starts it at X0 Y0 Z0 and draws the first move from there.
Treat it as a fast way to see the shape of a program and catch obvious problems. It does not replace running the program above the part with the spindle off, and it does not replace a proper machine simulation.
File formats
G-code goes by a lot of extensions depending on who wrote the post processor. This viewer accepts .nc, .gcode, .tap, .ngc, .cnc, .mpf, .eia and plain .txt. Comments in either parentheses or after a semicolon are ignored, as are line numbers and block delete slashes.