Drill files from Cadence allegro

Hi,
I’m using gerbview as reviewing tool for what I generate in Allegro. But i’m not able to load drill files. Shows lots of “Tool 0 not defined” errors and some "Unexpected symbol 0x52 ". Those files can be correctly loaded into gc prevue. Anyone seen similar problem and know the solution?

ps. 5.99 latest nightly built
Regards
Kriss

My guess would be that your drill files are actually gerber files and not excellon files

But you would need to post a sample file here to be certain

Start by opening those files in a text editor.
That will give you a pretty good idea of what is actually in them.

There are also may Gerber and drill file dialects. Some adhere closely to the “standard” (which has evolved in the last 50 years or so), but even then, may use other features of the standard that are not well understood by other programs, as it’s possibly they only implemented the sub-set that they need themself.

If it is truly a drill file, then you may be able to tweak it a bit with a text editor.

Thanks for answer.
The gc previeou identify file as “NC Drill”.
This is example of drill file for not plated holes:

M48
METRIC
;LEADER: 12
;HEADER:
;CODE : ASCII
;FILE : 20XXX111-1-4-np.drl for … layers TOP and BOTTOM
;DESIGN: 20XXX111.brd
; Holesize 1. = 0.760000 Tolerance = +0.000000/-0.000000 NON_PLATED MM Quantity = 3
; Holesize 2. = 1.170000 Tolerance = +0.000000/-0.000000 NON_PLATED MM Quantity = 8
; Holesize 3. = 3.300000 Tolerance = +0.000000/-0.000000 NON_PLATED MM Quantity = 2
%
G90
X0007050000Y0002690000
X0007050000Y0003490000
X0008975000Y0002270000
M00
X0006545000Y0000420000
X0006295000Y0000420000
X0007015000Y0000420000
X0006765000Y0000420000
X0007485000Y0000420000
X0007235000Y0000420000
X0007955000Y0000420000
X0007705000Y0000420000
M00
X0009688000Y0001645000
X0009688000Y0002915000
M30

That sure looks like a drill file.
Both Gerber files and Drill files use a format similar to “G-Code”, which is probably the oldest file formats still in widespread use. It was designed in the late '50-ies !

Lines starting with a semicolon are comment, and this means that there is no information about drill sizes in your file (Computer should ignore the comment).

If you compare your file with a drill file generated by KiCad, it’s quite obvious what to change. I see definitions for “T1” through “T12”, which are tool numbers, and the “C” after their definitions are either diameter or radius of the tools. Later those tool numbers are used to switch to those tools.

X & Y are used for coordinates, and your file uses a different format for coordinates, although both use “METRIC”.

For quick compare. Here is the start of a drill file generated by KiCad.

M48
; DRILL file {KiCad 5.1.10-88a1d61d58~88~ubuntu20.04.1} date Mon May 17 23:03:10 2021
; FORMAT={-:-/ absolute / metric / decimal}
; #@! TF.CreationDate,2021-05-17T23:03:10+02:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.10-88a1d61d58~88~ubuntu20.04.1
; #@! TF.FileFunction,Plated,1,2,PTH
FMAT,2
METRIC
T1C0.400
T2C0.600
T3C1.000
%
G90
G05
T1
X108.966Y-108.458
T2
X103.148Y-110.363
X104.648Y-110.363
T3
X85.75Y-92.243
X85.75Y-94.783
X85.75Y-97.323
X85.75Y-99.863
X85.75Y-102.403
X85.75Y-104.943
X85.75Y-107.483
X85.75Y-110.023
X85.75Y-112.563
X85.75Y-115.103
X85.75Y-117.643

Your drill files have coordinates in a fixed format. I do not know if KiCad is able to handle those in drill files. I had a look at a gerber file made by KiCad and it has a similar fixed format without a decimal dot in the numbers.

But if you want to know more details, then look up some official documentation of these file formats.

So it looks like, simply, Kicad does not support drill files from allegro.
I thought NC drill and excellon are the same but they are apparently not.
Anyway, thanks for help! I really appreciate.

Regards
Kriss

FWIW, you might find this interesting reading: https://www.artwork.com/gerber/drill2gbr/cadence_drill2.htm

Note that, by default, allegro does not output the tool data in the Excellon file.

As I suggested earlier, those file formats exist in different dialects.
You may even be able to tweak the settings in allegro to bring it closer to KiCad’s variant. Wikipedia has a short overview with some differences:

If the link Seth posted does not work, it would also be relatively easy to write some script to convert between the dialects.

This Cadence file is real crap. No machine readable tool sizes, no tool commands, no indication where the decimal point is. Small wonder GerbView struggles with it. Fortunately it does state that it is ASCII - this is really helpful.

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