KiCAD drill files

I use KiCAD, a free suite of EDA applications. http://www.lis.inpg.fr/realise_au_lis/kicad/.

Today I was dissapointed to learn that batchpcb can use KiCAD’s Gerber output, but not its drill files. Here is how my KiCAD drill file starts:

M47 DRILL file {PCBNEW 19-oct-05} date 1/12/2005-07:17:18
M48
R,T
VER,1
FMAT,2
INCH,TZ
TCST,OFF
ICI,OFF
ATC,ON
T1C0.025
T2C0.032
T3C0.055
%
M47
G05
M72
T1
X4.650Y3.000
X5.300Y3.700
T2
X5.650Y3.300
X5.750Y3.400
X5.650Y3.500
X4.350Y2.800
X4.850Y2.800
X4.300Y3.150
X4.800Y3.150

Since KiCAD has no options for its drill file output, I need to post-process the file. I can see that the decimal places need to be removed and leading zeros need to be added to the X…Y… lines. What about the other lines?

Can you offer assistance on how to convert this into a usable file?

((RayDar))

Here’s how one of my eagle drill files starts (passed batchpcb). I wonder if the “.” is the issue. try filtering the periods out and tell batch pcb its a 2.3 file.

Also, what does viewmate think of it?

%

M48

M72

T01C0.0236

T02C0.0240

T03C0.0320

T04C0.0350

T05C0.0400

T06C0.0500

T07C0.1260

T08C0.1280

%

T01

X19228Y12522

T02

X18429Y13349

X20679Y13349

X22554Y14224

X24679Y12474

X22679Y09849

X21554Y10349

X19804Y09849

X19804Y08974

X17804Y09849

X18304Y05974

X19304Y05974

X16304Y05974

X15179Y05974

X11179Y08849

X11179Y09599

Thanks for your suggestions Philba.

I found some specifications for the drill file format, which seems to date back to just after the second world war, at http://www.electronics-lab.com/forum/at … amming.pdf.

It turns out that KiCAD is using the floating point number format mentioned in this PDF, which, as the beginning of the document states, may or may not be compatible with older drilling machines. I guess the floating point number format may or may not be compatible with PCB manufacturers as well.

I re-uploaded, and ordered, the project and noticed that BatchPCB has “floating point” as one of the options for drill file format. I don’t recall seeing that option before.

The author of KiCAD says the next release (current release is 27-October-2005) will include an option panel for selecting floating point, 2.3, and 2.4 numeric format.

I run a Microsoft-Free zone here, so I cannot use VieMate, but thanks for the suggestion.

((RayDar))

good to hear.

I’m pretty sure there are free linux and mac gerber viewers around.

Philba:
I’m pretty sure there are free linux and mac gerber viewers around.

Actually, KiCAD comes with a nice gerberviewer with the imaginative name of ‘gerbview’ but it doesn’t show drill files, which share some formatting with gerber files, but are technically not gerber files at all.

((RayDar))

After installing gerbview, a free Linux program that reads “drill files” ( http://gerbv.sourceforge.net/ ), I was able to figure out everything in these pesky Kicad files that is unacceptable.

  • - Decimal format, instead of 2.3 or 2.4 fixed-point format
  • - Extra stuff (TCST, ICI, ATC) in the header
  • - Y coordinates should all be negative
  • I have made a website that converts Kicad drill files to something that should work for BatchPCB. It’s at http://www.RayDarLLC.com/kicad/. You can run your KiCAD drill files through the website and it will send you back a modified file.

    I have verified this website’s output with gerbview. But that is as far as I can go. If someone from SFE could try this website with their software, that might help avoid future headaches.

    Today, they released a new version of KiCAD.

    This version seems to have enough enhancements to make the drill files work for BatchPCB.

    When creating a drill file, be sure to use the following settings:

  • - Drill Units: inches
  • - Zeros Format: supress leading zeros
  • - Precision: Either 2.3 or 2.4
  • - Drill Origine: Absolute
  • - Drill Sheet: None
  • - Mirror Y Axis: OFF
  • - Minimal Header: ON
  • That should make files that work with BatchPCB.

    this works great, thanks for the pointers!