Okay it is possible to pre-process the g-code manually like this:
1) Launch an instance of Monokrom (sim)
2) Navigate to the Monokrom Simulation Config Directory. Open terminal there and set environment variables
Code:
~/linuxcnc/configs/sim.monokrom/plasmac$ export CONFIG_DIR=$(pwd)
~/linuxcnc/configs/sim.monokrom/plasmac$ export INI_FILE_NAME=$(pwd)/xyz.ini
3) Call preprocessor in terminal with the input.ngc processed by the SheetCam PlasmaC Post
Code:
~/linuxcnc/configs/sim.monokrom/plasmac$ python3 plasma_gcode_preprocessor.py input.ngc > processed.ngc
The output is the processed.ngc. The first few lines are below:
Code:
Filter name: from-ini func: <function from_ini at 0x7ff0a03176a0>
(--------------------------------------------------)
( Plasma G-Code Preprocessor )
( 00.30 )
(--------------------------------------------------)
;inputs
#<ucs_x_offset> = [#5221 + [[#5220-1] * 20]]
#<ucs_y_offset> = [#5222 + [[#5220-1] * 20]]
#<ucs_r_offset> = [#5230 + [[#5220-1] * 20]]
#<array_x_offset> = 0.0
#<array_y_offset> = 0.0
#<array_columns> = 1
#<array_rows> = 1
...
This is why I get the error in input.ngc line 1: Unknown word where unary operation could be. The first line contains "Filter name: from-ini func: <function from_ini at 0x7ff0a03176a0>".