Assigning drill sizes

Hi all,

I’m wondering if there’s away to assign drill hole sizes in the Drill File. Kicad often assigns multiple tools for the same drill - example below:-

Drill file ‘filename.drl’ contains
*** plated through holes:***
*** =============================================================***
*** T1 0.800mm 0.0315" (6 holes)***
*** T2 0.800mm 0.0315" (62 holes)***
*** T3 1.000mm 0.0394" (5 holes)***
*** T4 1.194mm 0.0470" (25 holes)***
*** T5 1.500mm 0.0591" (29 holes)***
*** T6 3.200mm 0.1260" (4 holes)***
*** T7 3.200mm 0.1260" (2 holes)***

*** Total plated holes count 133***

Not plated through holes are merged with plated holes
*** unplated through holes:***
*** =============================================================***
*** T8 2.600mm 0.1024" (1 hole)***

As you can see, T1 & T2 are the same, also T6 & T7 are the same.

Kind regards
Pedro

If you are getting it manufactured shouldn’t you let the factory worry about this? In fact if your job is part of a large panel they probably optimise over the whole panel, and might even try to minimise travel of the drill head.

And welcome to the forum.

Thanks for your reply.

Sometimes I’m the ‘factory’. I can engrave a PCB. My machine doesn’t have an automatic tool changer - so, I have the choice of:-

  1. waiting for the machine to prompt me for redundant tool changes,
  2. manually edit the drill file to remove the redundancy…

Both are a pain :frowning:

Kind regards
Pedro

Write a script or program to merge the duplicates then.

I have also noticed that looking through drill map I have several symbols for the same hole size.
Even if writing the script or a program is the solution isn’t the right way that KiCad would merge the same holes together?

You might be able to do this in a Python plugin instead of adding more C++ code for a feature that most users have no need for.

Curious enough to look into my Gerbers, I find that all of them already have the holes sorted in order of size and in the use section they are mentioned only once, followed by all the locations with that size. The only project with drill files that might possibly be merged was this where the 0.1200 might be merged with the 0.1201.

$ grep ^T *-PTH.drl
T1C0.0250
T2C0.0320
T3C0.0394
T4C0.0400
T5C0.0410
T6C0.0500
T7C0.0591
T8C0.1024
T9C0.1200
T10C0.1201
T11C0.1220
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T0

So I wonder what version of KiCad OP is running.

Thanks for the replies.

It seems that Kicad sort drills into several categories:-
PTH,ViaDrill
PTH,ComponentDrill
NPTH,ComponentDrill

For my purpose, these are all the same.

I can see that my situation would be a minority case (?). Although, being able to merge similar drill sizes would be handy too.

I’ll continue to manually edit the drill file, until I find the time to C++ it.

Kind regards
Pedro

Well seeing you’re your own factory then you should develop a drill hole sorting function for your “factory” CAM software. :wink:

1 Like

For many years according to arrangements made around 1995 with our PCB manufacturer we made them a list of holes to be drilled and not the final hole sizes. PTH holes got 0.1mm diameter bigger drill hole than NPTH hole of the same final size. So I am surprised that for you PTH and NPTH are the same. I just suppose that PTH 0.5mm is drilled as 0.6mm and NPTH 0.5 mm is drilled 0.5mm.
If I have the same hole size in via nad in pad then I suppose they are listed separately (KiCad 7.0.2 Windows).

A little off topic, I know, sorry . . . I have seen other people saying that they make their own PCBs on CNC . . . I just have to ask, why ? is your application so unusual that you need to do it that way ? what is the reason, I’m genuinely curious :slight_smile:

I am my own-factory… I CNC mill my PCB’s and, though I do have custom footprints with Oval pads and preferred diamater Holes, I stopped fussing with changing them in Kicad. I prefer to change them (if needed) in CopperCAM used for Milling them… Very easy to change them (shape and Hole diam…etc).

Example of Change Panel…

I suppose that some people like if from design to PCB it takes 1h.

I suppose when the apocalypse comes and transport is cut off you’ll still be able to make PCBs. :wink:

1 Like

I didn’t want to “reinvent the wheel”, so, I was just seeing if someone had already done it… No luck, I’ll get back to the wheel :slight_smile:

You are correct. If you are PTH, then the hole size is the finished size, not the drill size. The PCB manufacturer would calculate the plating thickness based on your copper weight spec.

My CNC doesn’t PTH. All holes are NPTH, therefore, they are all the same in my case.

More like a castor, if I’ve understood the requirements.

1 Like

Firstly, I don’t CNC all of my PCBs. CNC’d PCBs have lots limitations. It is speed!

eg. A customer of mine had supply problems with a chip. He had found a another chip that did the same thing, but had a couple of pins that functioned a little differently. I picked up a board and the chip from him at 9:30am. I designed an adapter PCB with some tiny logic on the under side to correct the function, CNC’d it, tested it. I delivered it back at 3:30pm… Very happy…

4 Likes

Copper CAM - Looks interesting. I’ll look into it…

I’ll put a belt between the CNC and my exercise bike, and I’ll have the market cornered… :slight_smile: