pcb

drill size discrepancy between fab and drill file (rounding)

Bug #699318 reported by duncan_drennan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Medium
Unassigned

Bug Description

A fab house picked up a discrepancy between the fab file drill table and the drill file drill size. The hole is 2.85mm (11220 pcb units) and is show on the fab file as 0.113 inches (incorrect) and in the drill file as 0.112 inches (correct).

Tags: core sf-bugs
Revision history for this message
duncan_drennan (duncan-drennan) wrote :
Revision history for this message
duncan_drennan (duncan-drennan) wrote :

Win32 build of PCB, version 20091103

Revision history for this message
Jared Casper (jaredcasper) wrote :

This results from the "+ 0.0004" in print.c lines 270 and 273 which date back to Harry's commit on 2004-02-03 (f81eee86).

The fab file and drill file should definitely agree, but why do you say rounding to the nearest (or down) is correct as opposed to always rounding up as is done in the fab drawing? Is that in a standard someplace?

Revision history for this message
duncan_drennan (duncan-drennan) wrote :

Valid point regarding the rounding. I'm not sure if there is a standard, but it makes more sense to round up.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Still valid in current Git master.

Changed in pcb:
status: New → Confirmed
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Funny. If I add a second pin with 11230 units, both, fab and drill file, report 2 drills of .112.

It turns out that RoundDrillInfo() in drill.c doesn't round a single drill at all. This functions means to reduce a list of drills by putting entries of similar size into one entry. PrintFab() in print.c sets this rounding to one mil. This '+ .0004' is still there, but normally not in effect, because RoundDrillInfo() rounds to full mils already.

With the issue found it's easily fixable, but it raises another question: the Gerber drill file file still lists two different drills, giving a mismatch in the number of neccessary drills:

M48
INCH
T18C0.112
T17C0.112
%
T17
X002000Y001937
T18
X002500Y001937
M30

What should the behaviour be? Rounding all Gerber output, drill file as well as fab file, to one mil (hardcoded) or doing no rounding at all?

Looking at the advancing technology I'd vote for doing no rounding, because in a not too far future 1 mil might be simply too coarse. Users should know what they're doing (they can also apply a vendor drill map) and pcb shouldn't change things, like the number of required drills, behind the user's back. This would mean to change the fab file and leave drill file as it is.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Fine. First I fixed rounding, then I removed rounding :-) Both commits directly on master, as per DJ's request.

I removed rounding, because it was for display, only, so the number of distinct drills on display and in the actual CNC file could differ. Very confusing. Now the Gerber fab file can show more than one drill of the same size, if they differ less than one digit. Hopefully less confusing, at least less fooling the user.

One can always apply a vendor drill map, joining similar drill sizes for all, display as well as CNC files.

Changed in pcb:
status: Confirmed → Fix Committed
Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Medium
status: New → Fix Released
Changed in pcb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.