#!/bin/bash # Reproduction for OrcaSlicer issue #17352: M191 chamber-temp control is emitted # even though the printer option support_chamber_temp_control is disabled (the # filament checkbox activate_chamber_temp_control is then hidden in the GUI but # its stored value still drives the gcode). # # Run from the worktree root. Requires $ORCA_BIN. set -x cd "$(dirname "$0")/.." # Case A (BUG): printer support_chamber_temp_control=0, filament activate_chamber_temp_control=1, chamber_temperature=50 # Expected: no M191 anywhere. Actual: "M191 S50" before machine_start_gcode, "M141 S0" at the end. $ORCA_BIN --debug 1 --load-settings repro/machine.json --load-filaments repro/filament.json \ --slice 0 --outputdir repro/out repro/cube.stl grep -n "M191\|MACHINE_START_MARKER\|support_chamber_temp_control =\|activate_chamber_temp_control =" repro/out/plate_1.gcode # Case B (control, capability on): support_chamber_temp_control=1 + filament on -> M191 present (correct) $ORCA_BIN --debug 1 --load-settings repro/machine_on.json --load-filaments repro/filament.json \ --slice 0 --outputdir repro/out_on repro/cube.stl grep -c "M191" repro/out_on/plate_1.gcode # Case C (control, filament off): support_chamber_temp_control=0 + filament off -> no M191 (correct) $ORCA_BIN --debug 1 --load-settings repro/machine.json --load-filaments repro/filament_off.json \ --slice 0 --outputdir repro/out_off repro/cube.stl grep -c "M191" repro/out_off/plate_1.gcode