OpenCAD · G-code·Heidenhain·MPR·PGI·XML

OpenCAD NC Viewer

A free NC viewer for checking 3D toolpaths in G-code, Heidenhain (Klartext and DIN/ISO) and panel machining files (woodWOP MPR, WangShi PGI, KDT XML). You can trace code lines together with their moves and replay the machining sequence while watching the stock being cut. Lines to check before the program goes to the machine are flagged as warnings.

.nc.gcode.ngc.h.mpr.pgi.xml

Screen showing example G-code opened with OpenCAD NC viewer. In the center, the tool paths for the outer contour, circular pocket, and drill hole are shown in different colors for each tool, and in the right panel there is a playback bar and a list of G-code lines.
Screen showing an example G-code file

About this tool

A tool for examining the move order and toolpaths of CNC programs. It interprets linear, arc and helical G-code moves as well as Heidenhain programs; selecting a code line shows its move on the 3D path, and selecting a path shows its code line. Dialects such as Haas and Siemens, and lathe programs, are recognized from the file contents and announced in a bar above the view. Opening a main program together with its subprogram files reads them as one job. Panel machining files (MPR, PGI, XML) are drawn as holes, grooves, pockets (free-form ones included), contour machining and edge banding on the panel, with the operation list and variables alongside. Material removal up to the replayed position is simulated with a 3-axis height map, and lines where a rapid move passes through the stock are flagged separately.

Format
G-code in the ISO, Fanuc, Haas, Siemens, LinuxCNC, GRBL and Mach3 families, Heidenhain Klartext and DIN/ISO, woodWOP MPR, WangShi PGI, KDT XML
Path/Route
3D toolpaths linked to code lines, per-tool display, machining sequence playback, stepping one move at a time, code search, 3-axis simulation that cuts the stock up to the replayed position
Information
Feed and rapid move lengths, estimated time, cutting extent and deepest Z, feed, spindle and offset state of the selected line, operations and variables in panel machining files
Warnings
Warns about lines such as H or D numbers that differ from the tool number, cutting with the spindle stopped, or rapids below the deepest cut, and jumps to the line when tapped
View
Rotate and zoom, standard views, sections, two-point measurement that snaps to arc centers, midpoints, intersections and perpendicular feet, Shift direction lock (tangent direction on arcs and splines), PNG export
Mobile
A single row of view, measure and playback buttons, plus a measure bar and press-and-hold precise aiming to check the distance between two points on the toolpath. Added to the home screen, it opens without an internet connection

Getting started

  1. Open NC Viewer and check the synthesized G-code with “Open Example”.
  2. Open an NC file (G-code, Heidenhain, MPR, PGI or XML) or drag it into the window. If subprograms are in other files, select them together.
  3. Select code lines or 3D paths to view their associated movements.
  4. Review the machining sequence using tool-specific indicators and the playback bar. Tapping a warning in the information panel takes you to that code line.

Available for free, with no installation or user registration required. File parsing and display are processed within the device's browser; the selected drawing or model files are not uploaded to a server.

Support and limitations

  • Macros, cycles, and coordinate systems may be interpreted differently depending on the equipment. Even when a specific dialect is supported, not all commands are reproduced in the exact same way.
  • Okuma OSP programs are recognized, but only the coordinate system (G15 H) is read. Okuma-specific syntax such as CALL and VC variables is not drawn and is reported as a warning.
  • Moves to machine coordinates such as G53 and G28 are drawn as dashed lines at an estimated safe height until you enter the machine position of the work origin in the settings.
  • The toolpath display and the stock-removal simulation cannot tell you about collisions or machining quality. The simulation is an approximation from a 3-axis height map: it does not show tool holders or undercuts, and lathe and multi-axis programs are not simulated. Verify against the original CAM and machine conditions before running it on the machine.

Use a browser that supports WebGL2 and JavaScript. OpenCAD is a personal open source project released under the MIT license.

Check for issues with opening or displaying the file