Additional Scripting Variables

I’d like to see Scripting Variables added to reflect the current printer’s geometry, i.e max_X, max_Y, max_Z, etc.

This would allow for an ending gcode to contain:

{% if state/Z < subtract(max_Z, 30) %}
G91 ; Set to relative mode
G1 Z30 F{{ travel_speed }} ; move nozzle up off print
G90 ; Set to absolute mode
{% else %}
G1 Z{{ max_Z }} F{{ travel_speed }} ; move to maximum Z
{% endif %}

There are probably other settings that make sense to include as script variables.

Thanks for the input, I’ll add these to the list for the next time we do work on the scripting system. Thankfully, all of this is relatively easy for us to implement, so if you have any other ideas for useful variables do let us know!! I’m afraid I don’t know when our next pass on scripting will be, so I don’t have a hard timeline for when we can get this in.

Also, I am not certain that else is supported yet (although we should get that in if it’s not already). You may have noticed too that the documentation needs some more TLC for scripting, so I’ll be working on that soon after we have our roadmap out and ready to go.