Previewing G-Code using OpenSCAD

To put it to use, rather than Livecode (which I did my initial proof of concept in), shifting over to Python — first step is working up an interface which will allow customizing numbers and setting filenames and so forth and having a couple of buttons to write out the files:

EDIT: Things look better w/ the numbers centered — will have to look into decimal aligning them.

Using pycharm as an IDE, so the file is “main.py”:

main.zip (1.7 KB)

Just the skeleton of things — actually coding things up is next.

EDIT: filename insertion now works, and writing out a sample file, and getting the “Preview in OpenSCAD” button to load and render the file, so on to actual coding — writing out lines and arcs should both be in place, so next up is working out the mechanics of keeping track of the current tool and working up stuctures for actually cutting.