Our parser is written according to Ucamco RS-274X Gerber Format Specification.
Revision 2016.12 is fully supported and revision 2017.05 compatibility is under development. The following commands and functions are tested:
FS | Coordinate format | |
Absolute notation | Supported | |
Leading zero omission | Supported | |
Incremental Notation | Deprecated Not Supported | |
Trailing zero omission | Deprecated Not Supported | |
MO | Unit mode | Supported |
AD | Aperture definition | |
Circle | Supported | |
Rectangle | Supported | |
Obround | Supported | |
Polygon | Supported | |
Circular hole in standard apertures | Supported | |
Rectangular hole in standard apertures | Deprecated Supported | |
AM | Declare aperture macro | |
Comment, Primitive Code 0 | Supported | |
Circle, Primitive Code 1 | Supported | |
Vector line, Primitive Code 20 | Supported | |
Center line, Primitive Code 21 | Supported | |
Outline, Primitive Code 4 | Supported | |
Polygon, Primitive Code 5 | Supported | |
Moire, Primitive Code 6 | Supported | |
Thermal, Primitive Code 7 | Supported | |
Variable values | Supported | |
Arithmetic expressions | Supported | |
Lower left line, Primitive Code 22 | Deprecated Supported | |
Primitive Code 2 | Deprecated Not Supported | |
AB | Block aperture | Under development |
Dnn | Current aperture | Supported |
D01 | Interpolate operation | |
Line | Supported | |
Single quadrant arc | Supported | |
Multi quadrant arc | Supported | |
Coordinate data without operation | Deprecated Supported | |
G01/G02/G03 in a data block with D01/D02 | Deprecated Supported | |
D02 | Move operation | Supported |
D03 | Flash operation | Supported |
G01 | Linear interpolation mode | Supported |
G02 | Clockwise circular interpolation | Supported |
G03 | Counterclockwise circular interpolation | Supported |
G04 | Comment | Supported |
G36 | Start region statement | Supported |
G37 | Ends region statement | Supported |
G74 | Single quadrant mode | Supported |
G75 | Multi quadrant mode | Supported |
LP | Load polarity | Supported |
LM | Load mirror | Under development |
LR | Load rotation | Under development |
LS | Load scale | Under development |
SR | Step and repeat | Supported |
Closing SR with the M02 | Deprecated Supported | |
SR and AB nesting | Under development | |
TF | File attributes | Supported |
TA | Aperture attributes | Supported |
TO | Object attributes | Supported |
TD | Delete one or all attributes | Supported |
M02 | End of file | Supported |
G54 | Select aperture | Deprecated Supported |
G55 | Prepare for flash | Deprecated Supported |
G70 | Set the unit mode to inch | Deprecated Supported |
G71 | Set the unit mode to mm | Deprecated Supported |
G90 | Absolute notation | Deprecated Supported |
G91 | Incremental notation | Deprecated Not Supported |
M00 | Program stop | Deprecated Supported |
M01 | Optional stop | Deprecated Supported |
IP | Image polarity | Deprecated Ignored |
AS | Axes correspondence | Deprecated Ignored |
IR | Image rotation | Deprecated Ignored |
MI | Mirror image | Deprecated Ignored |
OF | Offset | Deprecated Ignored |
SF | Scale factor | Deprecated Ignored |
IN | Image name | Deprecated Ignored |
LN | Level name | Deprecated Ignored |
Deprecated - occurrence of such commands is out of actual standard
Supported - the command is fully supported
Not Supported - parts of image can be missing or incorrectly rendered
Ignored - command has not effect or it cause minor modifications like mirroring or rotation
Under development - function fill be ready soon
For the purpose of commonly used drill files under Excellon NC format. Following commands from standard are supported:
; | Comment | Supported |
T | Tool definition/selection (circular) | Supported |
METRIC METRIC,LZ METRIC,TZ INCH INCH,LZ INCH,TZ M71 M72 | Measure mode | Supported |
Xnn / Ynn / XnnYnn | Coordinate change / Drill | Supported |
G00 | Route | Supported |
G01 | Linear move | Supported |
G05 | Drill mode | Supported |
G85 | Slot | Supported |
G90 | Absolute mode | Supported |
G91 | Incremental mode | Supported |
M30 | End of program | Supported |
M48 | Start of header | Supported |
M95 % | End of header | Supported |
All not listed commands are unsupported or have not effect on rendering.