A .gbr file as a picture
A Gerber RS-274X layer (.gbr, .gtl, .gbl) opens on its blob page as an SVG
of the copper, with its units and board size as text. Source is one tap away.
src/web/render/gerber.tsparses and draws;kinds.tsmaps the extensions to thegerberkind (the head must carry%FS,%MOor open onG04, else the file stays text);renderers.tsnames the renderer.- Drawn: flashes of circle, rectangle, obround and polygon apertures, straight and arc tracks, and regions, y up, fitted to the copper's extent.
- Counted, not drawn: macro apertures, clear polarity, single-quadrant arcs (G74), step and repeat, other extended commands. Regions draw arcs straight.
- At most 50,000 objects are drawn; the page says how many were left out, and the board size still covers them. No
units (
%MO), no format (%FS), nothing drawable, or a file over 5 MB: the source view, with the reason. - Try it: commit a
.gbrfile to a repository and open its file page.