Closed psyvision closed 2 years ago
Would you care to elaborate on why a duplicate command is needed for selecting tools and how it is easier to use? T# is stamdard in both RRF and Marlin for tool selection. I belive this can be added as a optional macro that just sends the T parameter on to T# to avoid making a duplicate nonstandard command.
I like the other changes :)
I agree with @TypQxQ, the T# command is a standard for CNC routing/milling as well.
On my VCore I use a macro for the start print routine, this is pretty much my only start code in PrusaSlicer. The start print macro does z tilt, bed mesh, tool pre warming etc. and I want to be able to pass in the index of the first tool to print with (using the PrusaSlicer variable) and select it and a certain point in the routine.
I'd asked about on a few discords to see how to generate a Tx command dynamically but didn't get any response. Granted it could be a macro with a set of ifs but I wasn't a fan of that.
You mean like T{next_extruder}
in Slicer?
Any way you do it you have to pass the parameter somehow.
You can write a macro like this if you want the TOOL_SELECT functionality as a macro:
[gcode_macro TOOL_SELECT]
description: Select a tool.
gcode:
{% if params.T is defined %}
T{params.T}
{% endif %}
[gcode_macro TOOL_SELECT] description: Select a tool. gcode: {% if params.T is defined %} T{params.T} {% endif %}
Sweet, thank you. I had tried something like this previously but was getting errors around the command being valid. This macro does the trick just right. I'll clean up this MR.
Great work @psyvision !
TOOL_SELECT T=X
command to enable easier selection of tools in macro scenarios/slicer integration%f
for complete decimal output versus%d