Hi guys!

I would like to share a script that I wrote for wrapping 2.5D G code around a rotary axis. You can download it from here:
https://github.com/qtul/axes_swapper/

Using it is pretty easy. The code is in axis_swapper.py. You can invoke it from the command line with:
Code:
axis_swapper.py Circumference InFile OutFile
or
Code:
python axis_swapper.py Circumference InFile OutFile
Where:
  • Circumference is the length in the Y axis which corresponds to a 360 degrees rotation
  • InFile is the file which will be converted
  • OutFile is the file where all Y axis references are converted to A axis and scaled


I've tried other 4th axis wrapper tools out there, but they don't do F word conversion. As a result, combined rotary and linear axis moves are very slow. My script handles that problem.

Your code must have only linear moves. There's an option in most CAM tools to do this. The engravings on the handwheel that you see here is generated with CamBam and wrapped with axis_swapper.

I'm going to start another thread in the projects page for the dial that you see. There will be more pictures there.

Hope this is useful for you guys. If you have any suggestions for improvement, please let me know!