I need to rotate Gerber and Excellon files before processing them for G-Code for a tiny CNC. Problem I have is that it's an existing Gerber + Excellon drill file with no source. And I have a tiny CNC (10×15cm) so I need to rotate them by 90°.

gerbv does have this feature, but as of 2.6.0 – which is the only one I could get hold of via homebrew – the drill files aren't rotated upon export. It might be fixed in later versions but I'm not sure.

I'm currently delving into either:

  • building gerbv from latest sources which unfortunately seems hard on my machine
    • using a later version from a virtualbox
    • start to script the rotation of the file myself

How would I accomplish that in the easiest way possible?


1 Answer 1


I would suggest taking a look at FlatCAM which is a Free, Gratis & Open Source PCB CAM. While a quick search of the documentation do not mention rotation the whole thing is written in python and you may well find others that would be interested in collaborating on adding such a feature.

  • Thanks for the recommendation. I've actually given FlatCAM a few shots previously, but have had little success in even running it on OSX. There are broken dependencies for qt or something, and I guess I'm waiting for this: bitbucket.org/jpcgt/flatcam/pull-requests/75/… I instead turned to pcb2gcode which is a command line tool for creating gcode from gerbers, but it does not have any feature to rotate on import. Aug 9, 2018 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.