TypQxQ / Klipper_ToolChanger

A Klipper plugin and macros for controling a Toolchanging 3D printer
GNU General Public License v3.0
132 stars 27 forks source link

Improve offset output information #4

Closed psyvision closed 2 years ago

psyvision commented 2 years ago
TypQxQ commented 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 :)

Nanotech45 commented 2 years ago

I agree with @TypQxQ, the T# command is a standard for CNC routing/milling as well.

psyvision commented 2 years ago

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.

TypQxQ commented 2 years ago

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 %}
psyvision commented 2 years ago
[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.

TypQxQ commented 2 years ago

Great work @psyvision !