I made a terrible mistake, can I retrieve pad and hole sizes from gerber files?

OK, so I’m a terrible human being. I didn’t save a PCB design that I had edited a footprint on, just made the Gerber files and have no clue how I didn’t hit save…I have a cat, can I blame the cat?

It’s not a complex footprint, just a DPDT toggle switch footprint with 6 holes and pads of 2 different sizes to give me some slop for different manufacturers’ tolerances. I worked perfectly when fabbed but just went back to change another part of the PCB and I didn’t save it after tweaking the footprint.

I have the original Gerber and drill files, is there an easy way (as I’m clearly an idiot) to extrapolate the sizes of the holes and pads I used so I can reconstruct the footprint and actually save it this time?

The drill file has the drill sizes listed at the beginning.

; DRILL file {KiCad (5.1.12-1-10_14)} date Sunday, December 12, 2021 at 11:24:26 AM
; FORMAT={-:-/ absolute / inch / decimal}
; #@! TF.CreationDate,2021-12-12T11:24:26-07:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,(5.1.12-1-10_14)
; #@! TF.FileFunction,Plated,1,2,PTH

This says that drill #1 has a diameter of 15.7 mils.

You can decode the Gerber file using this information:

But, it’s probably easier to just load the file in Kicad’s gerber viewer and use the measure tool

1 Like

For understanding the pad shapes and positions in the Gerber files you can consult the Gerber specification from the Ucamco websites. Pad shapes are confusingly called apertures. The spec helpfully contains a few sample files that explains how things work.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.