Fixing an Eagle Plugin: pcb-gcode

A project log for Sub $200 PCB Mill that doesn't suck!

A PCB mill inspired by open source CNC 3D printers with a custom design to fit standard size copper clad boards (6" x 4" / 160mm x 100mm)

timo-birnscheinTimo Birnschein 06/19/2017 at 03:380 Comments

For a long time, people using Eagle for designing PCBs and pcb-gcode to generate mill files for RepRap based cnc machines complained a missing feature/bug in pcb-gcode:

All generated outline milling for the PCBs is cut in one go. As you can imagine, using a 1 mm endmill, even though carbide coated, doesn't like running through 1.8 mm fiber glass board in one go. People (including me) requested this feature for a while but it was no where to be seen.

One of the goals for this project is to have the simplest solution for everything possible. Very much like the OtherMill software, where everything just works straight out of the box as long as you follow the rules that are clearly laid out for you. Therefore, adding Z slices for the PCB outlines to the gcode by hand only to mill out the PCB was not an option anymore.

So, as if I didn't read enough foreign code this weekend, I dug into yet another code. Luckily, Eagle uses a scripting language for their ULP files that is very much like C, so adapting to that was easy and very straight forward.

I added a text field to the pcb-gcode-setup that allows to set the number of slices used to cut the outline of the PCB:

I also modified two more files to add the actual functionality. It turned out to be extremely easy since I essentially only added a text field and a for-loop where the commands are generated written to gcode file.

I'm very happy with the results. Just download pcb-gcode and add my simple patch to it.