Gerber viewer

Open any fab set, inspect apertures, measure, compare and check Gerbers.

Gerber, Excellon and job files open in a read-only viewer on the same canvas as the board editor. Opening any .gbr, .gtl, .gbl, .gts, .gbs, .gto, .gbo, .gtp, .gbp, .gm1, .gko, .gbrjob, .drl or .xln file loads every fab file in its folder as one set. Electronics Designer: Open fab set… opens a folder or a .zip of one. The viewer reads files from any CAD tool: RS-274X with or without the X2/X3 attributes, legacy RS-274D (it reads an aperture list such as board.apr next to the file), and Excellon with or without a header. Anything it cannot read becomes a warning in the Apertures section, and the file is still drawn.

Gerber tab (left). The set name and file count, then Layers. Each layer is named from its X2 .FileFunction (Copper,L1,Top → F.Cu), else from the job file, else from the file name (KiCad’s -F_Cu.gbr, Protel’s .gtl … .gko, .g1, .g2 … for the inner layers). Each row has:

  • a colour swatch (click to pick a colour)
  • the layer function
  • the opacity (click to step through 100 / 75 / 50 / 25 %)
  • ± to show the layer negative
  • the eye to hide it

Drag a row, or press Alt+↑ / Alt+↓, to restack it: the top of the list draws on top. Masks start at 45 % and pastes at 50 %. Flip board shows the set from below. Drills on top draws the drill files above the copper. Load folder and Load zip replace the set in this editor. 2D / 3D stacks the layers into a board using the job file’s thicknesses (1.6 mm without a job file).

Apertures lists the selected layer’s D-codes: code, shape, size and aperture function. Click a row to select every object that uses that D-code.

Aperture inspector. Click any object for a popover showing:

  • the object (Flash · U2-7 · D11)
  • the D-code and shape (AM RoundRect, Circle …)
  • the aperture function, the size in mm
  • the X2 net (.N) and pin (.P)
  • the layer and how many objects use the D-code

On layers drawn flattened (clear polarity, or shown negative), a click is matched against each object’s shape: a stroke at its aperture width, a flash’s aperture shape, a region’s outline. A clear object removes what is under it.

Highlight D11, Highlight net and Highlight U2 select those objects on the canvas. The net highlight tool and Esc work as on a board. Measure with the editor’s measurement tool (the ruler in the tool bar). The board’s edit tools are hidden here.

Gerber tab (right). Export saves the view as PNG (the canvas) or SVG (the visible layers in mm, with their colours). The Compare and Checks sections sit in the same tab.

The status bar shows the set while a viewer is active, for example Gerber · 12 files · mm · 4.6 · X2 (units, the coordinate format most files use, and X2 or X3 when the files carry attributes). The viewer re-reads the set, a folder or a zip, when its files change on disk, so it follows a re-plot or a hand edit. A hand edit of a documentation sheet’s .kicad_doc.json sidecar shows the changed views and tables as stale on the open sheet.

From the command line: edsnx gerber parse fab/board-F_Cu.gbr --json prints one file (attributes, apertures with use counts, object counts, bounding box, warnings). edsnx gerber set fab.zip --json prints the layers as the viewer names, colours and orders them, the job file and the status line.

Comparing and checking Gerbers#

The viewer’s right Gerber tab has two more sections.

Compare. Compare with board plots the project’s board in memory with the native engine (with the set’s options) and XORs it with the open files, layer by layer. The board is found from the job file’s project name, else a single .kicad_pcb in the folder or up to three folders above it; otherwise you pick one. Compare with folder compares with another fab set (a folder or a zip): two revisions, or kicad-cli’s files against native ones. Each layer row shows match or the number of differing regions and the XOR share of the layer. The differences are drawn in magenta on the canvas with a marker per region (“F.Cu: 0.12 mm² only in Gerber”); click a row to centre it. Layers are paired by their X2 file function, so the file names do not matter. Compare kicad-cli’s files with native ones plotted from the same stored zone fills: kicad-cli’s Check zone fills (on by default in the Plot dialog) refills the zones first, so a board whose fills are stale shows a difference on the poured layers (on the sample, B.Cu differs by 0.5 % until the zones are refilled and saved). Clear removes the overlay.

Open in review opens the review over the canvas. Each layer has a row with:

  • an XOR thumbnail: grey where both sets agree, orange only in the first set, magenta only in the second;
  • both areas, the XOR % and the number of regions (click a region to centre the canvas there);
  • aperture and attribute differences, and a match or N diffs pill.

Layers found in only one set are listed too. Export Markdown writes the review with the images, both sets on one frame and the visual diff, and opens it in the preview. If a file of either set changes on disk, a Stale banner appears; Re-run compares again. Esc closes the review.

Electronics Designer: Review Gerber vs Gerber opens the same review for the active viewer’s last compare. Without one, it asks for two fab sets, opens the first and reviews it against the second.

Checks. Run checks runs Gerber-level DFM on the files themselves, so Gerbers from any tool can be checked: minimum copper feature, copper clearance between nets (X2 netlist), annular ring of plated holes, solder mask slivers, pads without a mask opening, paste off copper, an open board outline, hole to copper, missing layers and files that disagree with the job file. The limits come from the project’s active DFM profile (see DFM profiles); the section names it. Each rule shows ✓ or its findings in warning or error colour; findings are markers on the canvas and entries in the Problems panel, and the status bar shows Gerber DFM 1 warning.

Export ▸ PDF saves the visible layers as a vector PDF at 1:1.

From the command line:

sh
edsnx gerber export blinky.kicad_pcb --out fab/              # native Gerbers, drills, maps and job file
edsnx gerber compare blinky.kicad_pcb fab/ --json            # did the plot match the board?
edsnx gerber compare fab-rev-a.zip fab-rev-b.zip --png diff.png
edsnx gerber check fab.zip --profile jlcpcb-4 --fail-on error
edsnx gerber check fab/ --load                               # also open the set with gerbv or tracespace
edsnx gerber view fab/ --png fab.png --pdf fab.pdf
edsnx gerber job fab/ --json

In output jobs, the gerber step takes engine: native or kicad-cli, and the gerberCheck step (off by default) runs the checks on the step’s folder and fails the job on errors. Documentation fabrication views have Copper from: plot, which draws copper and mask from the native plot so the drawing equals the files.

Documentation for Electronics Designer 2.3.60.