Open Packaging Conventions for Gerber Files

Motivation for this Proposal

A while back I found interest in a news release from IPC (Feb 20, 2012 - pertaining to IPC-2581 “reaching an important milestone.” Transmission of PCB design information has been a nagging problem, and basis of employment for many, for decades. Getting the right information, in the right format, adhering to the right constraints, in a timely way has been difficult. It is still difficult for many.

The homepage statement for IPC-2581 introduces the motivation for developing the new standard, and begins with this statement:

“PCBs have changed significantly over the past three decades, yet to the surprise of many, we still commonly use 30-year-old ways of communicating design intent to manufacturing.”

Bravo! Moreover, encouragingly, the statement continues:

“Gerber format, properly implemented, is perfectly adequate to transfer image data, but it does not transfer stack up data, materials, design intent or net list.”

Words I can agree with (though in my opinion Gerber-274X is more than just “adequate” in its role). Gerber is old, no doubt, and designed for machines that largely no longer exist (but new machines that also use Gerber do exist, and are numerous).

Such observations on the Excellon drill data format would be fair as well. And, as far as I know, there is little more sophisticated than CSV for standard representations of bills of material.

However, it is difficult to argue that these formats are “broken” or “don’t work” – PCB designs are successfully built each day based on these formats.

As I kept reading, I was in for an unpleasant surprise:

“IPC, the trade group, has been aware of the challenges and dynamics of the PCB design and manufacturing segment and has been an ardent advocate for the replacement of these old data-communication formats.”

The emphasis above is mine. Replacement? I did not see that coming.

By advocating replacement of these formats (Gerber, Excellon, CSV – even the formidable plain text README) IPC is making an hopeless NIH (not-invented-here) reaction to what, by its own admission, are working and adequate formats. Do the organizations involved have an agenda they are pushing? On the other hand, presuming Hanlon’s Razor, are they simply unable to recognize the dead-end into which they have ventured?

Legacy Code (and Machines) can’t be Ignored (Sorry)

Exactly how many billions of dollars in equipment to they expect fabricators to buy to make use of this new format? And new software for designers?

Working in the software industry imparts a few gems of knowledge (very few, in my case). One top realization is that organizations upgrade software slowly. CAD software is upgraded less than most. Machines are upgraded far less than CAD software, and get “handed-down” to lower-tier companies rather than retired. It is not too far from the truth to say, “Old software never dies; old machines never die.”

While wanting and even wishing for a “standard” technology to go away is understandable, it is not realistic or useful. I remember conversations regarding the “end of life” of the DXF format while I was at Autodesk. Wisely, those were fleeting conversations. Unfortunately, IPC seems to have missed what Autodesk recognized – the value in the accumulated code, machinery and content is far too valuable to the industry at large to abandon. Being a de-facto standard is, largely, an irreversible burden.

Keep it Simple

In software, LE/SS is more. IPC is not a software organization, and so they deserve a little slack when it comes to understanding what makes software successful (or not). Nevertheless, it does not take much reading to get the current glasnost – use the Least Effort to develop the Simplest System. Agile is the big buzzword, DRY is another, and there are many more that express the same general idea of building small, targeted solutions with quick revisions and improvements based on what’s learned from people who actually use it.

IPC-2581 is the antithesis of that approach. There was no need to reinvent Gerber, or Excellon, or various net-lists, or any of the other formats they have subsumed.

PCB fabrication houses struggle with two issues in processing inbound design sets:

  1. Getting the right content (files) and understanding how to use them.
  2. Processing the content to confirm it can be build and at what timeline and cost.

Solving problem #1 is a required step to making progress on #2. Without understanding the PCB designer’s intent, analysis is premature and may result in garbage output.

The core problem in transmitting PCB design data is not some missing whizz-bang one-size-fits-all format – it is the packaging of the formats, not the formats themselves. A consistent, computer-readable convention for assembling files together and assigning usages to them would make life much simpler without the quixotic quest to unseat the existing standards.

Stand on the Shoulders of Giants

Putting files together into one is a solved problem – ZIP does the trick. Moreover, and relevant to this article, ZIP is already in widespread use in the PCB supply chain. A quick survey of PCB websites shows the vast majority mention ZIP as a desirable or acceptable way to send files for manufacturing. It makes sense – a single file is easier to manage (for people and software) than a bunch of files.

That leaves the issue of file usage or the roles of each of the files, and that is a two-part problem.

Identification of File Types (use MIME)

One complication with Gerber files (and to a lesser degree the other formats in PCB supply chain) is the lack of consistency in file names and especially extensions. Because of this, software handling them can’t immediately tell which files in a set are Gerbers versus the other types (there are tricks to do this, but it has to be done in a non-conventional way that many software systems, like file systems and web servers, simply aren’t going to do).

MIME types are the internet’s way of communicating the “type” of content irrespective of names or extensions (they are most widely used to describe the content of email attachments and things downloaded from websites). Consistent usage of MIME types can make PCB design data “fit” into the scheme of things on the internet and your local hard drive. Software vendors need to start using the IANA (Internet Assigned Numbers Authority) registered MIME type for Gerber files – It’s official, software developers can now register their extensions with this MIME type. By conforming to this usage, the existing diverse set of file extensions can continue without problems. Leveraging “” makes it possible for software to recognize Gerber file no matter what they happen to be called or how it is accessed.

Similarly, the industry can easily align behind a single official MIME type for the Excellon format.

Identification of File Usage (Innovation Required)

The final piece needed (not wanted, or wished) to solve the precise problem with communicating PCB design files for fabrication is file usage mapping – aka. “Layer assignment.” That problem is more interesting, and requires (a little) more work. Lucky, much of it has also been done by others and just need to be applied with consistency.

Layer assignment is the process of indicating which files represent layers of copper, patterns of solder mask, board outlines, hole locations, stack up and other needed information. If you or your purchasing agents are ordering online, you know and despise this step. It is prone to errors, and has to be repeated for each quote and order (if you do not do it, a person at the fabrication shop will). The stakes are high. Incorrect layer mapping will render your circuit boards useless in most cases.

Reusing what is already out there is not an option for layer mapping. Unless we look to IPC-2581, that is. Wrapped-up in the bulk of unnecessary solutions is one gem – the definition of a rich set of standardized “usages”. In section 8.2.1 the specification calls-out all the different layerFunctions, sides and polarities for geometry data, and those definitions are perfectly adequate for indicating how files inside a ZIP should be used. I would prefer names that are more human-friendly, but that is a quibble.

In Summary

In operating for the past few years, I have become excited and motivated to see some great improvements in the productivity of PCB designers and the companies that support them by building boards. While I believe IPC-2581 comes from the best of intentions, it fails to address the core problems with targeted, easy to implement and obviously valuable solutions.

We can do better. I propose documenting a convention-based solution that:

  • Is based on ZIP
  • Allows data to be supplied in existing CAD formats, Gerber, Excellon, DXF, SVG, PNG or anything else.
  • Gives designers a way to inform fabricators of where to find the needed information in the ZIP in a machine-readable way. Could be the name of a file, or the name of a layer, or a URL, or what?
  • Give the designer a place to add non-geometry data (meta data)
  • Gives the fabricator a real hope of automatically processing the files and getting it right at least 80% of the time.
  • What else?

And, I’m looking for collaborators. Want to join-in? Let me know.

Copyright © 2008-2021 CircuitPeople LLC, All rights reserved.  CircuitPeople™, Got Gerbers?™ and TrueGerber™ are trademarks of CircuitPeople LLC.