How do you read a drill file? - Page 1
Forum section: electronics / projects

author: Pack34
author_rank: Frequent Contributor
timestamp: September 22, 2021, 08:33:32 pm
content: Is there some good documentation on the commands and how to parse? I think I'm seeing a discrepency between the output drill file in OrCAD and what I'm seeing in the software. I just had a part made by my librarian and I'm only seeing the first hole on the new connector with a drill.The header seems to be fine with the correct number of drills.Code:; Holesize 1. = 12.000000 Tolerance = +0.000000/-12.000000 PLATED MILS Quantity = 18; Holesize 2. = 39.370000 Tolerance = +2.950000/-2.950000 PLATED MILS Quantity = 8; Holesize 3. = 41.340000 Tolerance = +2.950000/-2.950000 PLATED MILS Quantity = 20; Holesize 4. = 133.860000 Tolerance = +3.940000/-3.940000 PLATED MILS Quantity = 3But from what I can tell, this section is for the Holesize 3 that's for the new connectorCode:M00X0022000Y0113000R09Y-0010000X0230000Y0022000R09X-0010000Whereas, the holesize 2 section looks fine.Code:M00X0103000Y0133000X0093000Y0133000X0240000Y0085000X0230000Y0085000X0188000Y0132000X0178000Y0132000X0288000Y0133000X0278000Y0133000There seems to be 18 XY entries for holesize 1 (vias), 8 XY entries for holesize 2, 3 XY entries for holesize 4 (mounting holes) but that section for holesize 3 only has two.Does the R09Y-00100000 specify arraying that previous location by 9, in the Y direction at a spacing of 100mils?

author: Niklas
author_rank: Frequent Contributor
timestamp: September 22, 2021, 09:21:26 pm
content: R#This command drills a series of equally spaced holes from the previously specified hole. The number following the R specifies the number of repeats. An X and/or Y coordinate must be used to define the spacing between hole centers.https://www.artwork.com/gerber/drl2laser/excellon/index.htmX0022000Y0113000- Specifies the first holeR09Y-0010000- Specifies an array of 9 holes with identical spacing referenced to the first hole

author: Pack34
author_rank: Frequent Contributor
timestamp: September 22, 2021, 09:29:27 pm
content: Thanks!This is the first time I'm diving into one of these. It looks like the setup for these is surprisingly manual. Drill sizes specified in the header with each drill type having an XY plot and a END delimiter between each section.

author: Terry Bites
author_rank: Super Contributor
timestamp: September 24, 2021, 04:53:20 pm
content: https://github.com/curtacircuitos/pcb-tools/blob/master/gerber/excellon.py

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 26, 2021, 06:06:39 pm
content: Those drill files "evolved" together with gerber file formats over the last 50+ years or so, and many dialects exist.Your files appear to be in a quite old and deprecated fixed point format.For your reference I'll give you an example of a drill file as generated with KiCad, which has decimal dots in the numbers, and a header that specifies it's in metric millimeters.M48; DRILL file {KiCad 5.1.10-88a1d61d58~89~ubuntu20.04.1} date Sun Sep 26 19:56:41 2021; FORMAT={-:-/ absolute / metric / decimal}; #@! TF.CreationDate,2021-09-26T19:56:41+02:00; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.10-88a1d61d58~89~ubuntu20.04.1; #@! TF.FileFunction,Plated,1,2,PTHFMAT,2METRICT1C0.400T2C0.750T3C0.900T4C1.000T5C1.520T6C1.700%G90G05T1X188.595Y-96.901T2X175.3Y-144.14X176.57Y-144.14X177.84Y-144.14T3X198.5Y-118.5X201.04Y-118.5T4X163.68Y-91.77X168.68Y-91.77X170.855Y-103.12X174.905Y-103.12X180.725Y-97.07T5X175.185Y-90.52X180.265Y-90.52Also, Ucamco is the company that maintains the Gerber file format, and also makes the gerber plotters, and they have a free online reference viewer for Gerber files.https://www.ucamco.com/en/software/cad-cam-viewers/gerber-viewer