Introduction
Writers must not produce the constructs on this page. Readers may support them for old files. Standard Gerber and the older code spellings are revoked altogether.
Deprecated commands
| Command | Meaning | Deprecated |
|---|---|---|
G54 | Optional prefix of an aperture selection. No effect. | 2012 |
G55 | Prepare for flash, before D03. No effect. | 2012 |
G70, G71 | Unit inches, millimetres. Replaced by MO. | 2012 |
G90, G91 | Absolute, incremental coordinates. Replaced by FS. | 2012 |
G74 | Single-quadrant arc mode. | 2020 or 2021 |
M00 | Program stop. Same effect as M02. | 2012 |
M01 | Optional stop. No effect. | 2012 |
IP | Image polarity. | 2013 |
AS | Axis select. | 2012 or 2013 |
IR | Image rotation. | 2012 or 2013 |
MI | Mirror coordinate data. | 2012 or 2013 |
OF | Image offset. | 2012 or 2013 |
SF | Scale coordinate data. | 2012 or 2013 |
IN | Image name, a comment. | 2013 |
LN | Load name, a comment. | 2013 |
Where two years are shown, the specification gives different dates in different places.
Image commands
Each of these except LN is used at most once, at the start of the file. A and B are the axes of the output device. The order of execution is always MI, SF, OF, IR, AS, whatever the order in the file.
| Syntax | Effect |
|---|---|
%ASAXBY*%, %ASAYBX*% | Assigns the data axes X and Y to the device axes A and B. AXBY is the default. |
%INname*% | Names the image. No effect. |
%IPPOS*%, %IPNEG*% | Positive or negative image. A negative image starts dark all over and swaps dark and clear; its first object must be dark. The specification suggests a reader warn about IPNEG and skip it. |
%IR0*%, 90, 180, 270 | Rotates the whole image counterclockwise about (0, 0). |
%LNname*% | Names the following part of the file. May be repeated. No effect. |
%MI[A(0|1)][B(0|1)]*% | Mirrors coordinate data of the A or B axis. Apertures and step distances are not mirrored. A missing part means off. |
%OF[Ad][Bd]*% | Offsets the image, in the file unit, by up to ±99999.99999 with at most 5 decimals. A missing part means 0. |
%SF[Ad][Bd]*% | Multiplies coordinate data by a factor from 0.0001 to 999.99999, default 1. Apertures and step distances are not scaled. |
Single-quadrant arcs
After G74*, an arc covers at most 90°, and I and J are unsigned distances from the start point to the centre. Of the four possible centres, the one giving an arc in the set direction, of no more than 90°, with the least radius deviation is meant. Equal start and end points give an arc of zero length, not a full circle. G75 returns to the current mode.
Old format options
%FSTA…*%: trailing zeros omitted instead of leading ones. All leading zeros are present, and the string is padded with zeros at the end to the full length, so in format 23 the string15means 15.000.%FSLI…*%or%FSTI…*%: incremental coordinates, each relative to the previous position.- Fewer than six decimal digits.
- Rectangular holes in standard apertures, written as two further sizes, x
Xy. The hole is centred, fits inside the shape and does not rotate with the aperture. - Plotting with a solid standard rectangle aperture (deprecated in 2020). The rectangle sweeps along the path without turning to follow it.
Old macro primitives
| Code | Primitive | Parameters |
|---|---|---|
| 2 | Vector line | Identical to code 20. |
| 22 | Lower left line | Exposure, width, height, lower left X, lower left Y, rotation about the macro origin. |
| 6 | Moiré (deprecated 2021) | Centre X, centre Y, outer diameter of the outer ring, ring thickness, gap between rings, maximum number of rings, crosshair thickness, crosshair length, rotation about the macro origin. Exposure is always on. If there is no room for the inner ring it is a full disc; zero thickness or length leaves out the crosshairs. |
Old syntax
- A G01, G02 or G03 code in the same word as a D01 operation, as in
G01X100Y100D01*. It sets the plot state and keeps it. - Coordinates with no operation code after a D01, which continues the D01. After D02, D03 or an aperture selection the mode is undefined and such a file is invalid.
- Codes written as
G1,g01orG001. These were revoked in 2020: only the formG01is allowed. %SRX1Y1I0J0*%used to close a step and repeat, or placed in the header with no effect.- A new SR command inside a step and repeat, which ends it and starts the next.
- A step and repeat left open, closed by
M02*.
Old attribute values
The .AperFunction values Drawing, CutOut, Slot and Cavity are deprecated. Drawing was replaced by the specific drawing types. An earlier .CMnt value, Fiducial, was replaced in the list by Pressfit.
Standard Gerber
Standard Gerber, or RS-274-D, was a subset of the EIA RS-274-D numerical control format used to drive vector photoplotters. It was revoked in December 2012 and is no longer valid Gerber. It had no extended commands, no regions and no attributes, and could define neither the coordinate format nor aperture shapes. These had to be supplied separately, with the apertures in a wheel file that followed no standard.
Links
Reference
- Ucamco downloads – the Gerber Layer Format Specification (revision 2026.05), chapter 8 of which lists the deprecated elements