Key Takeaways
- RS-274X contains purely graphical 2D drawing primitives and lacks inherent layer stackup, electrical netlist, or pad function intelligence.
- Gerber X2 introduces standard %TF, %TA, and %TO attributes that explicitly define layer functions, component footprints, and net connections.
- While leading European fabricators (e.g., Eurocircuits) natively automate X2 ingestion, high-volume Asian fabs still rely heavily on RS-274X file extension heuristics.
- Gerber X2 maintains 100% backward compatibility: legacy RS-274X viewers simply ignore X2 attribute statements without throwing syntax errors.
1. Evolution from RS-274-D to RS-274X
The printed circuit board manufacturing industry was founded upon optical vector photoplotters. In the early era of computer-aided manufacturing, the original RS-274-D standard served as a numerical control (NC) command language for mechanical plotters. RS-274-D files contained coordinate movements (X and Y coordinates) combined with aperture select codes (D-codes, such as D10, D11). Crucially, the physical definition of each aperture—whether it was a 10 mil circular beam or a 50 mil rectangular pad—was not included in the file itself. Instead, it was typed into an external text file known as an aperture wheel list.
Whenever an engineer sent an RS-274-D package to a fabrication house, a human CAM operator had to manually map D-codes from the customer's text notes into the photoplotter's physical aperture wheel. This workflow was notoriously error-prone, frequently resulting in scrapped prototypes due to mismatched pad sizes.
In 1998, Barco ETS (now Ucamco) revolutionized the industry by releasing RS-274X (Extended Gerber). RS-274X resolved the aperture list problem by embedding all aperture definitions directly into the file header using standard commands such as %ADD (Aperture Definition) and %AM (Aperture Macro). Additionally, RS-274X formalized coordinate formatting (%FS), units (%MO), and level polarity (%LP), transforming Gerber into a fully self-contained 2D vector format.
%FSLAX46Y46*%
%MOMM*%
%LPD*%
%ADD10C,0.2500*%
%ADD11R,1.2000X0.8000*%
D10*
X1000000Y1000000D02*
X2000000Y1000000D01*
D11*
X3000000Y3000000D03*
M02*2. The 'Blind Vector' Limitations of RS-274X
Despite being the reigning global standard for over two decades, RS-274X suffers from what hardware engineers call the 'blind vector' dilemma. At its core, an RS-274X file is merely a digital blueprint of visual geometries: flashes (D03), traces (D01), and moves (D02). It describes what shapes to expose on film, but provides zero understanding of what those shapes represent physically or electrically.
Consequently, RS-274X files suffer from several major engineering handicaps in automated CAM pipelines:
1. Lack of Layer Identification: An RS-274X file does not explicitly declare whether it represents Top Copper, Bottom Solder Mask, or an Internal Ground Plane. CAM ingestion engines are forced to rely on filename extension heuristics (e.g., .GTL vs .cmp vs -F_Cu.gbr), which vary widely across EDA toolchains.
2. Absence of Pad Intelligence: There is no mathematical distinction between a surface-mount IC pad, a through-hole via pad, a test point, or a fiducial marker. They are all simply flashed apertures.
3. Missing Electrical Netlist: RS-274X provides no net connectivity metadata. CAM engineers cannot automatically verify whether two intersecting traces belong to the same net or represent a layout short without running complex geometric polygon reconstruction.
4. Disconnected Drill Data: RS-274X does not contain drill files. Drilling operations must be exported separately using Excellon NC drill format, creating synchronization risks between copper coordinates and hole positions.
Because RS-274X lacks layer identity, automated board fab quoting systems frequently misinterpret non-standard layer extensions. If an internal ground plane is swapped with an inner routing layer, the resulting boards will fail in production.
3. Gerber X2: Injecting Semantic Intelligence
To eliminate ambiguity without breaking the established worldwide photoplotter infrastructure, Ucamco introduced Gerber X2 in 2014. Gerber X2 is fully backward compatible with RS-274X: it uses identical vector drawing syntax, but augments the file with standardized machine-readable attributes prefixed by %TF (File Attribute), %TA (Aperture Attribute), and %TO (Object Attribute).
These attributes provide vital context directly to CAM automation engines:
• %TF.FileFunction: Declares the exact function and stackup position of the file (e.g., FileFunction,Copper,L1,Top or FileFunction,Soldermask,Bot). This eliminates all guessing based on filenames.
• %TA.AperFunction: Labels the exact engineering intent of individual apertures, classifying pads into ComponentPad, ViaPad, TestPoint, or Fiducial.
• %TO.Net: Associates individual traces and pads with their schematic net names (e.g., GND, +3V3_MCU, SPI_CLK).
• %TO.C: Labels component designators (e.g., C12, U1, R4), allowing automated optical inspection (AOI) machines to verify component placement directly from Gerber data.
%FSLAX46Y46*%
%MOMM*%
%TF.FileFunction,Copper,L1,Top*%
%TF.FilePolarity,Positive*%
%TA.AperFunction,ComponentPad*%
%ADD10R,1.5000X0.6000*%
%TO.Net,VCC_SYS*%
%TO.C,C101*%
D10*
X1500000Y2500000D03*
M02*4. Real-World Fabricator Compatibility
A common dilemma for electrical engineers is whether to submit RS-274X or Gerber X2 to commercial fabrication facilities. While Gerber X2 is undeniably superior from an engineering standpoint, real-world adoption varies significantly depending on the target manufacturer.
High-mix, quick-turn European fabricators such as Eurocircuits have fully adopted Gerber X2. Their automated CAM pre-flight portals automatically ingest X2 metadata to verify annular rings, calculate solder mask dams, and perform automated design-rule checks (DRC) in minutes.
Conversely, high-volume Asian prototyping houses (such as JLCPCB and PCBWay) operate heavily optimized custom CAM ingestion scripts originally tuned for standard 3-letter Protel extensions (.GTL, .GBL, .GTS). While their systems generally accept Gerber X2 without errors (because legacy parsers simply ignore unrecognized %T attributes), their automated quoting engines may still require users to rename files or manually verify layer mapping in an online previewer.
| Fabricator | X2 Native Ingestion | Netlist Verification | Recommended Format | Notes |
|---|---|---|---|---|
| Eurocircuits | Full Native | Automated (%TO.Net) | Gerber X2 | Zero CAM delays; stackup verified automatically. |
| JLCPCB | Accepted (Backward Compat) | Manual / IPC-D-356 | RS-274X or X2 | Pre-flight parser parses vectors; X2 attributes ignored. |
| PCBWay | Accepted (Backward Compat) | Manual CAM Review | RS-274X or X2 | Standard naming conventions recommended for fast-track. |
| Oshpark | Full Native | Automated Parsing | Gerber X2 or KiCad | Direct upload of KiCad_pcb or X2 archives. |
5. Pre-Flight CAM Export Checklist
Before generating your final fabrication ZIP archive in KiCad, Altium Designer, or Autodesk Eagle, follow this standardized pre-flight checklist to guarantee that your manufacturing package passes pre-production CAM verification on the first attempt:
- Coordinate Resolution: Set coordinate format to 4:6 metric (millimeters) or 2:5 imperial (inches) to prevent rounding drift.
- Board Edge Integrity: Ensure the board perimeter (Edge.Cuts or Mechanical 1) is a single, closed, continuous vector loop with zero gaps or intersecting lines.
- Drill File Generation: Export both Plated Through-Hole (PTH) and Non-Plated Through-Hole (NPTH) in a single unified Excellon drill file or clearly segregated filenames.
- Solder Mask Clearance: Verify minimum solder mask expansion (typically +2 mil / 0.05mm) and confirm that fine-pitch IC pins maintain a minimum 3 mil solder mask dam.
- Silkscreen Clipping: Ensure all silkscreen reference designators and polarity indicators are clipped away from exposed SMT pads by at least 4 mil.
- In-Browser Verification: Open the entire export archive in GerberPatch to verify visual layer alignment, layer visibility, and caliper dimensions before uploading to the fabricator.
Inspect your Gerber files 100% privately
Verify clearances, layers, and drill holes with zero cloud uploads in GerberPatch.