ArticleslgStudy

computer science

Gerber format

Gerber format is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gerber format rather than just read about it. In short: The Gerber format is an open, ASCII, vector format for printed circuit board (PCB) designs. It is the de facto standard used by PCB industry software to describe the printed circuit board images: copper layers, solder mask, legend, drill data, etc.

Gerber format — main illustration
Gerber format — illustration

Key takeaways

  • Gerber format belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gerber format to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gerber format from memory before moving on to harder problems.

Reference excerpt

The Gerber format is an open, ASCII, vector format for printed circuit board (PCB) designs. It is the de facto standard used by PCB industry software to describe the printed circuit board images: copper layers, solder mask, legend, drill data, etc. The standard file extension is .GBR or .gbr though other extensions like .GB, .geb or .gerber are also used. It is documented by The Gerber Layer Format Specification and some related (but less universally supported) extensions such as XNC drill files and GerberJob to convey information about the entire PCB, as opposed to single layers. Gerber is used in PCB fabrication data. PCBs are designed on a specialized electronic design automation (EDA) or a computer-aided design (CAD) system. The CAD systems output PCB fabrication data to allow fabrication of the board. This data typically contains a Gerber file for each image layer (copper layers, solder mask, legend or silk...). Gerber is also the standard image input format for all bare board fabrication equipment needing image data, such as photoplotters, legend printers, direct imagers or automated optical inspection (AOI) machines and for viewing reference images in different departments. For assembly the fabrication data contains the solder paste layers and the central locations of components to create the stencil and place and bond the components. There are two major generations of Gerber format:

Extended Gerber, or RS-274X. This is the current Gerber format. In 2014, the graphics format was extended with the option to add meta-information to the graphics objects. Files with attributes are called X2 files; those without attributes are X1 files. Standard Gerber, or RS-274-D. This obsolete format was revoked. The official website contains the specification, test files, notes and the Reference Gerber Viewer to support users and especially developers of Gerber software.

PCB fabrication data

PCBs are designed on a specialized electronic design automation (EDA) or a computer-aided design (CAD) system. The CAD systems then outputs PCB fabrication data to allow fabrication of the board. Fabrication data contains a Gerber file for each image layer and drill span (copper layers, solder mask, legend or silk...) (For historic reasons drill data is also transferred in NC formats although Gerber files are often of better quality.) Typically, all these files are "zipped" into a single archive that is sent to the PCB bare board fabrication shop. The fabricator loads them into a computer-aided manufacturing (CAM) system to prepare data for each step of the PCB production process. The .FileFunction attribute is the standardized method to link each layer in the PCB with its corresponding Gerber file in the fabrication data. If attributes are not supported, then only informal methods are available. A simple informal method is to express the file function clearly in the file name. Sometimes the file extension is abused to indicate the file function - e.g. .BOT for the bottom layer rather than the standard extension .GBR. In industry this is considered poor practice and engineers should use the appropriate X2 attribute instead. PCB Fabrication Data must comply with a number of rules: all layers must be aligned, a profile layer must be included, etc. Before fabrication, the exported files can also be reviewed for missing or duplicated layers, inconsistent drill data, and outdated design revisions. The CAD netlist can be embedded in the Gerber files. However, for historic reasons, netlists often are described in a separate file in IPC-D-356A, an electrical test format. The material stack up, components and finishes are typically provided in informal text files or drawings. In 2018 Ucamco has published a specification for an extension of the Gerber format to cover this fabrication documentation.

Extended Gerber RS-274X, extended Gerber or X-Gerber, was originally released in September 1998. It is a human readable ASCII format. It consists of a stream of commands generating an ordered stream of graphics objects. The graphics objects can be positive or negative. Superimposed in the correct order they create the final image. A Gerber file contains the complete description of a PCB layer image without requiring any external files. It has all the imaging operators needed for a PCB image. Any aperture shape can be defined. Planes and pads can be specified without the need to paint or vector-fill as in Standard Gerber. (However some implementations still use painting, problematic for the users of those files.) Released in February 2014, Gerber X2 adds additional metadata to the image. Attributes allow adding metadata to a Gerber file. Attributes are akin to labels providing information associated with image files, or features within them. Examples of metadata conveyed by attributes are:

The function of the file. Is the file the top solder mask, or the bottom copper layer, etc.? The part represented by the file. Does it represent a single PCB, an array, a coupon? The function of a pad. Is the flash an SMD pad, or a via pad, or a fiducial, etc. For more information about attributes see X2 FAQ or intro video in the external links. In 2020, Gerber X3 was introduced. Fabrication documentation such as finish, overall thickness and materials is specified in a separate Gerber Job File. An example of a Gerber file:

The format specification is published at the official website.

Standard Gerber (revoked) Standard Gerber was revoked in 2014. It was already obsolete after the introduction of the much more capable Extended Gerber in 1998. Standard Gerber was a numerical control (NC) format designed by Gerber Systems Corp to drive their vector photo plotters for the PCB industry in the 1960s and 1970s. It was a subset of the Electronic Industries Association RS-274-D specification, a format to drive mechanical NC machines in a wide range of industries. It was widely used to drive vector plotters. Standard Gerber was a simple ASCII format consisting of commands and XY coordinates. An example:

… excerpt ends here. Continue reading the full article.

Illustrations

Gerber format illustration
Gerber format: View of a Gerber format file
View of a Gerber format file

Worked examples

Example 1 — a first encounter with Gerber format

Start with the simplest possible case. Write down what Gerber format claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gerber format before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gerber format ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gerber format

In research
Gerber format appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gerber format in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gerber format is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer file formats, EDA file formats, Electronics manufacturing, so understanding it makes those chapters shorter.
In everyday life
Look for Gerber format outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gerber format” →

How to study Gerber format in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gerber format means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gerber format out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gerber format in simple terms?

The Gerber format is an open, ASCII, vector format for printed circuit board (PCB) designs. It is the de facto standard used by PCB industry software to describe the printed circuit board images: copper layers, solder mask, legend, drill data, etc.

Why does Gerber format matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gerber format?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gerber format.

Tags

  • Computer file formats
  • EDA file formats
  • Electronics manufacturing
  • Open formats
  • Vector graphics file formats

Keep exploring