CNC G Code Arcs to Lines Conversion Program Download


While writing the GCode Wrapper program I found I needed, as an intermediate step, to convert G Code arcs to lines, so that the resulting straight lines can be wrapped around a cylinder. Not really thinking about it much, I made it as a standalone program, expecting to then have a second program act as the wrapper. I had an idea which made the wrapping possible in one program, but was left with this standalone program out on a limb. However, I then discovered it might be useful on its own account.

Quite inexplicably, the commercially available program 'CNCWrapper' will only work on straight lines, so to be able to wrap a path with that program, it's necessary to convert all arcs to lines before loading the toolpath into CNCWrapper. This tool will allow you to do that - just remember, my freebie GCodeWrapper does not need this intermediate step.

The program works by reading and understanding the toolpath. All straight lines are passed through to the output file untouched. All arcs are converted within the program to straight line segments before being sent to the output file. The user can determine the size of the segments simulating the arc both by maximum length and by the maximum angle about the arc centre that the segment subtends.

The program can be downloaded below. The program, pdf help file, a readme file and source code are included in the zip file.

Download the G Code Arcs to Lines Program. (247 kb)

The program is a Windows program, and is known to run on Windows XP and Windows 7 (32 & 64 bit versions). It should work in any 32 bit windows operating system. The program is a single file .exe file and writes a windows .ini file in the directory you put the programs into. The Borland C++ Builder 4 source code is included so that you can check for yourself that the program does nothing unpleasant to your computer.

Update History

17 Nov 2016: Updated to parse text better & allow D Codes through into the output.

Chestnut Pens Miscellaneous Pages Home
Chestnut Pens Home