I'm trying to import some gerber files generated from KiCAD to double-check my gerbers (one additional check to the integrated Gerber viewer in the KiCAD package) before sending to a board house. This board has 36 PTH holes and 2 NPTH holes. KiCAD exports two separate Excellon drill files, one for PTH holes and the other for the NPTH holes. When trying to import these files to DFM Now! the PTH hole line up to the correct places, but the two NPTH holes are way off the board. It's as if the importer strips the leading zeros, but then thinks the numbers don't have the leading zeros stripped. (i.e., hole at X locaton of 011114 (2:4 format, no zeros stripped) is at x=11.114 instead of x=01.1114. I have tried setting the drill format settings for 2:4, no zero suppression. Similar reaction to the Y axis. I tried importing all the layers except the PTH drill file and got the same issues. KiCAD's gerber viewer doesn't show the same issue, and visual inspection of the .drl files doesn't show anything majorly amiss to my inexperienced eyes. The gerber drill map (*.pho) file shows the NPTH holes in the correct location so I don't think my source files are suspect. But I could be wrong.
I'm using DFM Now! v6.6.4 w/o license (free version) on 64-bit Windows 7.
I can send the full Gerber and Excellon drill file folder to someone internal to Numerical Innovations, but I'm not sure how my resale partners at Club Jameco would respond to publishing the design files publicly. (I have yet to ask how they think of OSHW projects being published with them...)
Feel free to email the files to: firstname.lastname@example.org
Note: My initial guess is that the drill file may have been outputted with a different coordinate (than the other files), but we'll be able to determine that once we have the sample files.
over 6 years ago
I don't think the formatting is wrong... Three experiments I ran:
Import the board project, only enabling the PTH drill file. => The board looks normal with the NPTH holes missing as expected.
Import the board project, only enabling the NPTH drill file. => The NPTH holes are still in the erroneous position way off board. The PTH holes are missing as expected.
Merge the two drill files. Because the NPTH drill file only has one tool, I changed that one to the next available tool number for the PTH drill file, and copied the tool definition and the two hole coords into a copy of the PTH drill file. Import the board project, only enabling the merged drill file as PTH holes. => All the holes are in the correct location. The NPTH holes are now PTH as expected.
I've sent all the original gerber and drill files as well as screen-shots of the DFM Now! import settings windows with the settings (and layer assignments) that I used for importing my Gerbers and NC Drill files to the support email address.
When the NPTH holes are imported into the incorrect place, they are so far off the board the easiest way I found to find them is to use the built-in generate Fabrication drawing function. (I do find it odd that the fabrication drawing function only accepts one NC Drill file, where most board houses want NPTH and PTH (and presumably blind/buried vias) in separate drill files. Is multiple drill file support when generating fab drawings only available in FAB 3000?)
But, that said if the error does seem to be in the KiCAD generated files, I'll submit a bug report with them. This just feels like a bug in your program.
Numerical Support Team
over 6 years ago
Thanks for sending the files. DFM Now! "Auto-Loads" all files correctly except for the small non-plated drill layer with 2 holes - Why?
Here's the problem: NC Drill files (and many Gerber files) have a critical flaw because they do not state their zero placement in their header, and leave it up to the CAM tool to guess the appropriate zero placement used for the drill. So for example without knowing the zero placement, the resulting value could be any of the following:
X011114Y035927 <---- Sample Coordinate Definition from your your Drill file
X=1.1114 Y=3.5927 (If Leading zero is 2 with trailing of 4) X=0.11114 Y=0.35927 (If Leading zero is 1....)
Auto Loads means that the CAM tool must guess all the format settings for each Gerber and Drill file. The benefit of the "Auto-Load" feature is that you don't have to do anything but select a folder -- the CAM tool will automatically detect all required scaling units, zeros placement, & then import all gerber, drill files, etc. 99% of the times all CAM software using some type of "automated import" feature, must first import the drill files and then "guess" the appropriate scale based on the size compared to the Gerber files.
The problem is during "Auto Load" DFM Now! loads all the files simultaneously and that one drill file only contains 2 holes (located closely together). DFM Now! compares the extents of that drill layer against your PCB and assumes that it has incorrectly loaded that drill and scales up by power of 10X.
Here's the following proposed solutions:
1. You can Auto-Load and then perform Drill import (menu: File | Import | Drill...) for that specific layer. See tutorial below: http://screencast.com/t/0YhzRICmtVZf
2. We could add an option in Settings... to "De-Activate AutoLoad Detection" which means whatever import settings are assigned during Auto-Load will be kept regardless of the result (kinda defeats the purpose of Auto-Load).
3. Add those non-plated holes to a single drill file, and inside DFM Now! go to the NC Tools table assign the tool used for non plated drills as "Non-Plated".
We will of course see what else we can do to improve Auto-Load, and use your sample file as a test case.
Thanks again for sending a sample file.
Best regards, Simon
over 6 years ago
Thank you for your reply. I was able to load the board by first loading the Gerbers, and then importing the NC Drill files. I didn't bother with auto load for any of them, I just verified that the import settings were correct for the files being imported.
Interesting that the auto load algorithms were so confused that it put the two NPTH holes way off the board bounds in the other files. The number format is in the files (both the NC and Gerbers), but it is in a comment line. And a comments can only be trusted to be free-form random text by computerized auto loaders. :-/
Has anyone come up with any defacto standards for a comment line describing number format, zeros, and absolute/relative coordinates for computerized auto import methods? Some format I could suggest to the KiCAD team as a feature request?
Also, with your experience with how many other EDA suites export data, are there any suggestions I could pass along to the KiCAD team for formatting changes? Any missing or improperly formatted data? (It works, but is there anything that could be done closer to the specification, instead of taking advantage of an accepted quirk of a popular platform? Sorta like asking if a web page follows W3C spec or uses IEv6 quirks...)