Hello!
I was wondering if there is a way to automatically generate drill files when doing the plot jobs. And also the map files. By the way, is there a reason not to plot them? All the fabs I know ask for drill files.
Thanks
Hello!
I was wondering if there is a way to automatically generate drill files when doing the plot jobs. And also the map files. By the way, is there a reason not to plot them? All the fabs I know ask for drill files.
Thanks
Drill files are necessary, they are what the board houses use to program the CNC drilling machines to put holes in your board (mounting holes, vias, through holes). Make sure you follow their guidelines for the details of the formatting that they want.
The drill map file is optional and for documentation only unless your board house specifically asks for it.
There isn’t a way to automatically generate the drill file in the current stable (5.1.9). There might be a way to script it in v6, but that is yet to be seen. (I’ve seen discussions about that here, but I don’t remember if the gerber and drill generation will be part of the v6 Python API.)
You can automatically generate your gerber files and drill files if you make a custom script for it.
There is even a demo script that does exactly that deliverd with kicad:
c:\Program Files\KiCad_v5_1_9\bin>python.exe ..\share\kicad\demos\python_scripts_examples\gen_gerber_and_drill_files_board.py d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\lipo_charger.kicad_pcb
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-CuTop.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-CuBottom.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-PasteBottom.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-PasteTop.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-SilkTop.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-SilkBottom.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-MaskBottom.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-MaskTop.gbr
plot d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\lipo_charger-EdgeCuts.gbr
create drill and map files in d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\
report: d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot\drill_report.rpt
create job file d:\Data\Documents\01_Projects\LiPo_Charger\lipo_charger\plot/lipo_charger.gbrjob
it is quite short and fully commented, so it is easy to follow, it you take a look at the other scripts in the demo folder, you can even make it part of the kicad UI.
you can find the demos on the installation path of KiCAD, in my computer it is:
C:\Program Files\KiCad_v5_1_9\share\kicad\demos\python_scripts_examples
Hello!
Thanks for your reply.
Drill files are necessary, they are what the board houses use to program the CNC drilling machines to put holes in your board (mounting holes, vias, through holes).
Yes, I’m aware the holes are necessary and I think there is no PCB without holes, that’s why I was
asking if they can be generated automatically when using the “plot” functionality.
it is quite short and fully commented, so it is easy to follow, it you take a look at the other scripts in the demo folder, you can even make it part of the kicad UI.
On the other hand, what I need is only 2 clicks away, so I will not bother learning how to deal with
scripts. As it can be done with 2 clicks, I thought there might be a setting to generate the drills
automatically everytime the gerber files are plot.
Maybe this is a better option?
When started to be interested in KiCad (4.0.6/4.0.7) I supposed that I will be using File-Export-SVG to get my documentation files, but there are practical reasons I ended with using File-Plot-SVG.
Practically for typical PCB I do 3…5 times Plot and only one time I need to export drill files.
Thank you for the correction. I hadn’t realized (or had forgotten, same result) that the plotting commands are in the current (KiCad v5.1.9) Python API.
For people looking for the sample script, it is in this folder on my Windows machine:
C:\Program Files\KiCad\share\kicad\demos\python_scripts_examples
For other OS users, the demos folder was found on my system in the same folder as the templates folder. I found my templates file by looking up KICAD_TEMPLATE_DIR in KiCad’s configure paths window. I copied the path to my filemanager, went up one folder level, and there is the demos folder.
The difficulty here for designing a UI is generally the drill file is a completely different file format (with its own detail options) than the gerbers. It makes more sense for UI to have two different windows to keep the options for the two different formats separate.
Most board houses want what is known as an Excellon drill file, not a gerber file. AFAIK the reasons for this are historical, and out of scope for this answer. (Also, I only have a basic understanding so am not really an authority.)
That is certainly your choice, but especially if you use different board houses you might want to learn how to modify the scripts. This would allow you to make a script for each of the different board houses that you use. This is valuable because different board houses have preferences for slightly different style of outputs. They might want different formats (gerber precision 4.5 vs 4.6, zero format in Excellon, or combined NPTH and PTH vs separate NPTH and PTH files) to cleanly go through their processes. If you have a separate script for each house you don’t need to remember (for example) which house wants separate NPTH an PTH drill files and which ones want a single drill file with both NPTH and PTH holes.
Hello!
The difficulty here for designing a UI is generally the drill file is a completely different file format (with its own detail options) than the gerbers. It makes more sense for UI to have two different windows to keep the options for the two different formats separate.
From my point of view, “Generate drill files” could be a checkbox, same for report and map. Beside this, when you press “Generate drill files”, you get a panel in which you have again a “generate drille file” button, the only difference being the final s and the … missing on the button.
I agree it can make sense to have different spaces for different file formats. Make it a separate window or make it a tab inside the same window with gerber config / drill files config is just implementation detail. But I’m sure that a single plot command that would handle the whole gerber / drills / report / map would also make sense.
To summarize, as everybody needs a drill file anyway, I was a bit surprised that it’s kept separate. But I’m sure there are other priorities and that I have to respect the developers’ efforts. And beside this, it’s just a matter of 2 extra clicks per project.
At the moment there are no predefined settings for file export. The danger with having some files behind just a checkbox is that it would be too easy to forget to verify the settings. I would feel very uneasy if I wouldn’t see what I’m actually exporting.
There’s a “CAM manager” in plans for v7. https://gitlab.com/kicad/code/kicad/-/issues/2475
Hello!
The danger with having some files behind just a checkbox is that it would be too easy to forget to verify the settings.
I think the danger is already here. If you select plot from the menu and then again press plot, you get the files done without having to verify the settings.
On the other hand, that’s what I like in Kicad. When using Eagle, I was always thinking why do I have to load a cam job, why doesn’t it just plot what I designed, knowing that everything is defined. I would understand “plot as…” and then select the format, be it Gerber 274x or whatever other format.
As for the link for the cam manager, I fully agree with the first post. And the ideal solution for me would be a default output format, in which case the plot menu would just plot and generate drill files and all related document defined in some plot preferences.
I think KiCad is moving in the direction of storable and loadable artwork output, with (one of) the goals that you can fine tune the settings for a particular boardhouse and load those settings for that manufacturer. It would also be swell if PCB manufactures make such files that work for their process, and post them on their website. Or else they could at least be shared among users, for example via this forum.
@roboya
What is this “cam job” in eagle. Is it a file with such settings?
Hello!
I think KiCad is moving in the direction of storable and loadable artwork output, with (one of) the goals that you can fine tune the settings for a particular boardhouse and load those settings for that manufacturer.
Yes actually my first impression of 5.99 is that the settings are a lot easier and all at the same place. The best implementation for me would be that all the settings remain in the same state so that I don’t have to configure the board everytime I start a new one. For instance my board maker accepts 0.125 as a minimal width, and I have no reason to reconfigure it to some other value, so it’s always a pain everytime I start a new board to find where the hell these settings were.
A cam job is a file that you have to load in order to process the circuit into a set of gerber files. When I was using Eagle, I just asked the guy who sold me the license to make 2 files for me, one for 2 layers and one for 4 layers. And there was a specific way to do use them. Start from the project window otherwise it doesn’t work, load cam job, then from there load the board… well, I don’t remember the detail, something complicated that you have to write down otherwise you will never remember next time. All the simple actions were complicated anyway. Maybe it has evolved since I last used it.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.