We put the commands for cutting into a .scad file and import it as a library and we can then have a LiveCode (or other) program which writes out the two sorts of files:
We then configure OpenSCAD for an external file and open the .scad file in it:
It’s then just a matter of creating the code to create the codes: