Advertisement
rootiest

SET_MATERIAL.cfg

Aug 15th, 2022 (edited)
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.93 KB | None | 0 0
  1. # Set Material-specific Configs
  2.  
  3. # Add this to your start_print line of the start gcode in Prusa/SuperSlicer:
  4. #     MATERIAL={filament_type}
  5. #
  6. # Add this to your start_print line of the start gcode in Cura:
  7. #     MATERIAL={material_type}
  8. #
  9. # Add this to your START_PRINT macro:
  10. #     {% set MATERIAL = params.MATERIAL|default('PLA')|string %}
  11. #     SET_MATERIAL MATERIAL={MATERIAL}
  12. #
  13. #
  14.  
  15. [gcode_macro SET_MATERIAL]
  16. gcode:
  17.    {% set MATERIAL = params.MATERIAL|default('PLA')|string %}
  18.     SAVE_VARIABLE VARIABLE=last_material VALUE="'{MATERIAL}'"
  19.     {% if MATERIAL == 'PLA' %}
  20.         SET_PRESSURE_ADVANCE ADVANCE=0.035 SMOOTH_TIME=0.040
  21.         SET_GCODE_OFFSET Z=1.904
  22.     {% elif MATERIAL == 'ABS' %}
  23.         SET_PRESSURE_ADVANCE ADVANCE=0.03 SMOOTH_TIME=0.040
  24.         SET_GCODE_OFFSET Z=2.001
  25.     {%else %}
  26.         SET_PRESSURE_ADVANCE ADVANCE=0.035 SMOOTH_TIME=0.040
  27.         SET_GCODE_OFFSET Z=1.904
  28.     {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement