TODO: Add table of content # Exporting gcode for CNC ## pcb2gcode Use CNC for drilling holes and milling board outlines. You can also use CNC for isolation traces milling. However, the best result will give you MSLA PCB exposure. Adapt milling and drilling parameters in the config file `millproject`. Look up [pcb2gcode/wiki](https://github.com/pcb2gcode/pcb2gcode/wiki) for help. ```bash nano millproject ``` *Make sure to set `mirror-axis` in the `millproject` to half of your board width!!!* ```bash ./export.sh ../kicad2panel/panel/Flow_Controller_Panel.kicad_pcb ``` Launch the `gSender` program. * Load the `gcode/drill.ngc` file for drilling holes. * Load the `gcode/outline.ngc` file for milling the board outlines. * Load the `gcode/back.ngc` file if you want to mill the isolation traces. * Load the `gcode/front.ngc` file if you want to mill the isolation traces. ## Milling tip: Increase the thermal spoke and trace width When routing for milling, use the widest traces possible. 1mm, 2mm and wider, the machine doesn't care, but later you won't be soldering leads to small fragile strips of copper. You can use copper pours for routing too. Set up the entire back side as one big GND pour. Then, increase the thermal spoke width to be larger than 1mm. This avoids small features and gives more room for error if a larger drill is used for the holes. ![Thermal spoke width](images/spoke_width.png)