Gerber file extension

Where do the file extensions GTS, GTL, etc. come from? Do they come from Altium/Protel or some other EDA software?

Sometimes it is difficult for me to know which is the corresponding one in KiCad. That’s why I have raised this issue:

According to the dialogue pane for generating Gerbers, they are from Protel.

It used to be that some fabs would require Protel extensions in submissions because they ran old CAM software. Of late I don’t know of any that can’t accept official Gerber filenames.

In a history long gone by it was not clear from the gerber files what their intention was. Solder mask, Silkscreen or copper is relatively easy to guess, but order of copper layers was not so easy, and the idea that guesswork was needed at al is bonkers in itself, so Protel used standardized filename extensions, and others also implemented this hack.

But for many years now, the function of each layer is embedded in each of the gerber files itself.

Yes, for me some extensions are easy to guess. For example GTP (Top Layer Paste) but I always end up hesitating with some of them. For example GTS: Solder Mask or Silkscreen? GKO: Equivalent in KiCad? GML: Just Edge.Cuts? GTO: Top Layer Overlay what? :slightly_smiling_face:

Why do you need to guess? An Internet search will find you lots of pages with the table of the file suffixes and layers. Have a copy on hand and consult it. E.g.

https://tinymicros.com/wiki/Protel_Gerber_Layer_Names

G?S is soldermask
G?O is silkscreen
GKO and GM1 both mean outline

As I said before when KiCad exports gerber to PCB editor

Yes, this is what I usually do…but if there is a cross-reference table it can be streamlined.

Not sure what your workflow is for importing Gerbers but couldn’t you write a script to rename the Protel extension files to the more readable KiCad filenames? E.g. project.GTO is renamed to project-F.SilkS.gbr?

Edit: I tried importing an ancient project made with KiCad 5.0, not 5.1!, not mine, with the Protel extensions but which has standard KiCad names before the suffix. The automatic layer assignment seemed to have picked the correct layers except for the .gm1 file. Renaming that to .gko resulted in a correct assignment to Edge.Cuts.

So I think you can get the result you want by renaming the files before reading with gerbview.

Good tip, a script to rename files could be a solution

You’re right and I must have been confused When I raised the issue. Kicad gerber viewer manage gerber Protel file extensions as expected.

The problem is when I import panel gerbers from JLCPCB or SAFEPCB (they seem to use the same software). I think I know what’s going on… They use ‘tl’, ‘ts’ instead ‘layername.gtl’,‘layername.gts’ and Kicad gerber viewer cannot recognise them and cannot make the automatic assignment. A similar case happens when importing gerbers from WURTH PCB. In this case they use ‘layername.ss’ (for F.Cu),‘layername.ts’, etc…

Anyway, I don’t think Kicad can do much more about it. If I ask for the moon, I would like Kicad to be able to parse all the variety of gerber files but I’m already happy with this and I think there are more important things to solve.

What is missing from both this thread and the gitlab issue, is the reason for wanting to use these obsolete filenames in the first place.

And I’m not sure about your missing. I don’t wish to use such obsolete names. They are given to me by the PCB manufacturers.

Sometimes I have to do a detailed inspection of the gerber panel from PCB manufacturers (as I already mentioned JLC, SAFE, WE and others). My assembly house (sometimes) ask for it and the reasons are out of this scope. The fact is Kicad Gerber Viewer is a bit limited for the analysis and I prefer to export panel gerbers to Kicad PCB Editor in order to work more comfortably and quickly.

I just received some boards from OSHPark which I had ordered using only the KiCad pcb file. I never made gerbers. This seems a lot easier. I suppose there may be a number of situations where that method does not quite work, but I sure prefer it.

There have been subtle variations in Gerber output and less subtle changes in zone filling across KiCad versions, that make using native KiCad files not so trustworthy. How do you know that the fab is not using V8.0.0 to open your pcb file?

Thanks, I did not know that.

What I do know is that OSHPark invites uploads of either zipped gerbers or KiCad pcb files on their main web page.

I just received the boards and will report if I encounter any issues related to those. Actually I can bounce that question off of them. I assume that I can ask them what KiCad version they were using.

I wonder whether they produced gerbers from my KiCad pcb file, and if they did, maybe I can get those gerbers to look for any surprises.

Coming back to OP’s question, if the fab is generating modern Gerbers then a smart script should be able to use the metadata in the file to rename the file suitably. Exercise left to keen programmer (don’t look at me).

Been a while since I looked at the gerber specification but IIRC it wanted all files to be called *.gbr. The file name was to have the description of the layer itself. I suspect this was problematic at some point as it used to be, computers could not open multiple files of the same name–let’s say you wanted to open and compare, side by side, two files. This used to be impossible without file renaming. The old 8x3 file format limitation went away eons ago but having project name, revision and then gerber file type can make for a long file name. I’m not sure how companies do file storage but unique file names when possible is usually not a bad thing–I would never want to dump multiple projects together in one folder but who knows how file storage is done.

Not quite sure what the issue is here. In the export generator you can change between Protel output naming and the *.gbr exports:

Is it just in understanding what each file exported is?

In trying to set up my KiCAD projects, i wound up making a template file, and like I do in Altium, I put in a cheatsheet–the FAB pdf drawing comes out with info about gerber exports.

Probably not needed as you can put in a layer stack table:


but I like to have, in case I have some mechanical layer not meant for fabrication usage that might escape to a board house.

[Although I wish I could edit that and remove the dielectric value and loss tangent, I don’t like them, I don’t do different laminates in my designs and usually just have a callout for laminate elsewhere.]

Long rambling post, sorry. I know making a FAB drawing and sending it to PCBWay just confuses them and I have to tell them to ignore. But all my stateside vendors expect this pdf, and I consider this standard practice. Low cost board houses, YMMV.

The idea of just sending a project to a board house for fabrication, no gerber generation, is interesting. For hobby projects it’s rather tempting, I could see that being a new direction that would simplify things. I’d never do it at work–Altium embeds 3D models into its PCB file and that can lead to IP problems (the board house may be under an NDA but why send out more info than needed?).