If you go to: Pcbnew / File / Fabrication Outputs / Drill (.drl) File Then at the bottom of the dialog you can generate a Map file or a Report File.
The report file is a simple text file which lists the drill sizes and number of holes for each drill:
Drill report for /home/paul/projects/kicad/mumar_base_stm32/mumar_base_stm32.kicad_pcb
Created on ma 28 dec 2020 18:41:54 CET
Copper Layer Stackup:
=============================================================
L1 : F.Cu front
L2 : B.Cu back
Drill file 'mumar_base_stm32-PTH.drl' contains
plated through holes:
=============================================================
T1 0,40mm 0,016" (111 holes)
T2 0,41mm 0,016" (14 holes)
T3 0,50mm 0,020" (17 holes)
T4 0,55mm 0,022" (2 holes)
T5 0,80mm 0,031" (8 holes)
T6 1,00mm 0,039" (68 holes)
T7 1,02mm 0,040" (42 holes)
T8 1,50mm 0,059" (6 holes)
T9 1,78mm 0,070" (3 holes)
T10 2,00mm 0,079" (1 hole)
T11 2,50mm 0,098" (1 hole)
T12 3,20mm 0,126" (2 holes)
T13 3,30mm 0,130" (4 holes)
Total plated holes count 279
Drill file 'mumar_base_stm32-NPTH.drl' contains
unplated through holes:
=============================================================
Total unplated holes count 0
The map file is a graphical representation of which drill sizes are used in different locations, and looks like:
The above is not a way to fix anything, just a way to get some statistics.
If you have via’s with different hole sizes you want to change, then you can work with: Pcbnew / Edit / Set Track and Via Properties
If you have footprints that have many instances on the board, then you can put those into a project specific library, then edit one of those footprints in the Footprint Editor, and update the footrpints on the PCB from that modified footprint.
If a footprint has many pads, then you can select one of those pad in the Footprint Editor, and then:
- Edit the hole size of the pad.
- Right click on a pad and: Pads / Copy Pad Properties
- Select all similar pads and: Pads / Paste Pad Properties
This also copies pad rotation and other properties to the other pads, so be careful with that. there is also a Push Pad Properties option. I have not experimented with that.
Everything put together, it’s quite a lot of work.
A much simpler and quicker way would be to close KiCad, open the PCB in a text editor and do some quick search and replace operations. Any Decent text editor can report how many strings have been replaced, and this should fit with the number of holes reported in the .map file. Hacking into these files with a text editor is quite error prone, so make a backup before you do this.
Search & replace works best if you replace the whole S-expression, so to re-use your example, search for: “(drill 0.315)” and replace it with: “(drill 0.32)”. If you search for just the numbers you will get a lot of false positives for coordinates.
An even simpler solution would be to just ignore it, and let your PCB manufacturer figure it out. Modern PCB drilling machines have automatic tool changers and lots of available drill sizes. Usually they also apply some rounding so holes with very small size differences just get drilled with the same drill size. If exact drill size is important, (for example for press fit connectors) then this should be communicated to the PCB manufacturer.
Some notes:
- I do not know if it’s common for all manufacturers to round their drill sizes, nor how much rounding they think is acceptable.
- Sometimes the drill size is specified, others interpret it as the size of the finished hole after plating. (approx 17um on both sides,)