I’ve been using pcb-gcode to fabricate printed circuit boards (PCBs) with isolation routing.
As much as I like the process, I’ve grown very tired of having to make the same changes to the gcode generated by the script; namely, removal of extraneous tool changes, lack of spindle speed, and commands that our machine doesn’t understand (e.g. “G04 P0.00000”).
I’ve made a python script to do the work; you can get it here.
It processes the .drill.tap, .etch.tap and .mill.tap files generated by pcb-code, makes all the necessary changes to make then workable for a CNT-Motion cnc router, and combines them all into a single file that includes the drilling, etching and milling operations. The script generates four files: “drill.tap”, “etch.tap”, “mill.tap”, and “all.tap”.
To use the script:
- put all files generated by the pcb-gcode script into a folder
- place the python script in that folder
- in terminal change to that directory and then run this command:
- python pcb-gcode-process.py *.drill.* *.etch.* *.mill.*
This script could likely be adjusted to make custom changes for other cnc machines. Feedback welcomed.