Gerber RS-274X
Gerber RS-274X is the standard photo-plotter format for PCB and semiconductor fabrication. LinkCAD supports both modern RS-274X (extended Gerber with embedded apertures) and legacy RS-274D formats.
Format Summary
| Property | Value |
|---|---|
| Extensions | .gbr, .gbx, .ger, .art |
| Encoding | ASCII |
| Import | |
| Export | |
| License | Gerber Option |
| Hierarchy | Step-and-repeat (SR) |
| Layers | Single layer per file (multi-file workflows) |
Import Options
Arc Resolution
| Option | Description | Default |
|---|---|---|
| Segments per 360° | Number of line segments for a full circle | 72 |
| Tolerance | Absolute deviation from ideal arc | — |
Aperture Handling
| Option | Description | Default |
|---|---|---|
| Load external aperture file | Auto-load .APT files from same directory |
Off |
| Apply layer polarities | Merge clear-field and dark-field data | Off |
RS-274D Legacy Options
For older RS-274D files without embedded aperture definitions:
| Option | Description | Default |
|---|---|---|
| Units | Inches or millimeters | Inches |
| Coordinate format | Integer and decimal digits for X/Y | 2.4 |
| Zero suppression | None, Leading, Trailing, or Decimal | Leading |
| Coordinate mode | Absolute or Incremental | Absolute |
| Circular interpolation | 90° quadrant or full 360° | 360° |
| Modal flash (D03) | Flash command stays active | Off |
Export Options
Geometry
| Option | Description | Default |
|---|---|---|
| Circular interpolation | Use G02/G03 for arcs instead of line segments | On |
| Default line width | Width for zero-width polylines | 0.0 |
| Step-and-repeat | Use SR commands for array references | On |
| Force draw mode | Use D03 for flashed apertures | Off |
| Output board outline | Include outline of drawing extents | Off |
Aperture Limits
| Option | Description |
|---|---|
| Min/max circular aperture | Diameter range for round apertures |
| Min/max rectangular aperture | Edge length range for rectangular apertures |
File Output
| Option | Description | Default |
|---|---|---|
| Single file | Combine all layers into one file | Off |
| Multiple files | One file per layer | On |
| Coordinate digits | Integer and decimal digit counts | 2.4 |
| Line endings | DOS/Windows, UNIX, or None | DOS |
Gerber Concepts
Apertures
Apertures define the shape of the "light beam" used to expose the photo-resist:
- Round — circular aperture with a diameter
- Square — square aperture with an edge length
- Rectangle — rectangular aperture with width and height
- Oblong — rounded rectangle (stadium shape)
- Custom — complex aperture macros
Polarity
- Dark — exposes (adds copper/material)
- Clear — masks (removes copper/material)
LinkCAD can merge dark and clear field layers during import using the Apply layer polarities option.
Step-and-Repeat
Gerber step-and-repeat (SR) commands create arrays of the entire image at specified offsets. LinkCAD maps these to array references during import.
Common Workflows
GDSII → Gerber
Convert IC mask data to photo-plotter format. Each GDSII layer typically becomes a separate Gerber file.
DXF → Gerber
Generate fabrication data from mechanical CAD drawings.
Gerber → DXF
Import Gerber fabrication data into a mechanical CAD environment for design review.
Technical Notes
- RS-274X files embed aperture definitions in the file header (AM/AD commands)
- RS-274D files require an external aperture table (
.APTfile) - Gerber coordinates are fixed-point; precision depends on the coordinate format
- Each Gerber file represents a single layer; multi-layer designs use multiple files
- Arc interpolation (G02/G03) produces more compact output than line approximation
CLI / Command-File Options
These option keys can be used on the command line or in command files.
Import
| Key | Type | Description |
|---|---|---|
GbrInUnits |
int | Import units — 0=inches, 1=millimeters |
GbrInCoordinateMode |
int | Coordinate mode — 0=absolute, 1=incremental |
GbrInFormatXInt |
int | X coordinate integer digits |
GbrInFormatXDec |
int | X coordinate decimal digits |
GbrInFormatYInt |
int | Y coordinate integer digits |
GbrInFormatYDec |
int | Y coordinate decimal digits |
GbrInZeroSuppression |
int | Zero suppression — 0=omit leading, 1=omit trailing, 2=explicit decimal |
GbrInQuadrantMode |
int | Arc quadrant mode — 0=single quadrant (90°), 1=multi quadrant (360°) |
GbrInApertureFile |
flag | Use external aperture file |
GbrInApertureFilePath |
string | Path to aperture definition file |
GbrInCustomApertureFile |
flag | Use custom aperture definitions |
GbrInMergeLayers |
flag | Merge all layers on import |
GbrInModalD03 |
flag | Modal D03 interpretation |
GbrInModalG02 |
flag | Modal G02 interpretation |
Export
| Key | Type | Description |
|---|---|---|
GbrOutDecimals |
int | Decimal digits |
GbrOutIntegers |
int | Integer digits |
GbrOutAbsCoordinate |
flag | Use absolute coordinates |
GbrOutSuppressLeadingZero |
flag | Suppress leading zeros |
GbrOutUnitsImperial |
flag | Use imperial units |
GbrOutCircularInterpolation |
flag | Use circular interpolation |
GbrOutFillPolygons |
flag | Fill polygons |
GbrOutFlashCircles |
flag | Flash circles |
GbrOutFlashRectangles |
flag | Flash rectangles |
GbrOutForceDraw |
flag | Force draw mode |
GbrOutSingleFile |
flag | All layers in one file |
GbrOutStepAndRepeat |
flag | Use step and repeat |
GbrOutWidthUnits |
int | Default width unit enum (see Units) |
GbrOutWidthValue |
float | Default width value |
GbrOutRoundAptLimitUnits |
int | Round aperture limit units (see Units) |
GbrOutRoundAptLimitValue |
float | Round aperture limit value |
GbrOutRectAptLimitUnits |
int | Rect aperture limit units (see Units) |
GbrOutRectAptLimitValue |
float | Rect aperture limit value |
GbrOutEobCharacter |
string | End-of-block character |
GbrOutParameterDelimiter |
string | Parameter delimiter |
GbrOutLinebreaks |
int | Linebreak style — 0=DOS/Windows (\r\n), 1=UNIX (\n), 2=none |