The plugin for Eagle PCB CAD called pcb-gcode is great, don’t get me wrong. But somehow it wants to start the coordinate system so that the X values are negative. Also it made some strange “margin” in Y-axis which makes alignment of the actual PCB to be milled difficult.
So I wrote a tool that can:
- automatically translate the axis so that there is no negative values
- automatically detect the actual “working piece” (values with negative Z) and use the working area’s “zero” as actual workpath zero. This way you can set the home to zero at the physical location where you want the mill to be started.
See this picture for the original gcode generated by the Eagle ULP:
And then gcode my program generated, reloaded back to the software itself (the green cross indicates gcode x+y zero point). The toolhead still visits to negative Y-values at the start but that’s too difficult to be removed (see the line that goes to bottom right corner):