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?

Sure.
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
FMAT,2
INCH
T1C0.0157
T2C0.0315
T3C0.0350
T4C0.0354
T5C0.0402
T6C0.0433
T7C0.0591
T8C0.0669
T9C0.1500
T10C0.2750
%

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.