FIX: Printable area check results in gcode_check_result

Added a check for Gcode traces outside the printable area after the backend slicer, allowing command-line slicers to detect abnormal results. The GCodeProcessor's m_result.gcode_check_result.error_code now includes not only dual-head print range checks, but also checks for the machine's plate print range, wrapping detection area, and height violations.

jira: none
Change-Id: I44072ece3b4b525c77328cec2f76e205eb559cc4
(cherry picked from commit 054f936243968687f536170374a233ec912e8e42)
This commit is contained in:
songwei.li
2025-08-06 20:37:53 +08:00
committed by Noisyfox
parent c0c12fcb1f
commit aa9fb1fd34
4 changed files with 108 additions and 42 deletions

View File

@@ -5835,7 +5835,12 @@ int CLI::run(int argc, char **argv)
BOOST_LOG_TRIVIAL(info) << "export_gcode finished: time_using_cache update to " << time_using_cache << " secs.";
if (gcode_result && gcode_result->gcode_check_result.error_code) {
//found gcode error
BOOST_LOG_TRIVIAL(error) << "plate " << index + 1 << ": found gcode in unprintable area of multi extruder printers!" << std::endl;
if ((gcode_result->gcode_check_result.error_code & 0b11100)>0)
BOOST_LOG_TRIVIAL(error) << "plate " << index + 1 << ": found gcode in unprintable area of the printers! gcode_result->gcode_check_result.error_code = "
<< gcode_result->gcode_check_result.error_code << std::endl;
else
BOOST_LOG_TRIVIAL(error) << "plate " << index + 1 << ": found gcode in unprintable area of multi extruder printers! gcode_result->gcode_check_result.error_code = "
<< gcode_result->gcode_check_result.error_code << std::endl;
record_exit_reson(outfile_dir, CLI_GCODE_PATH_IN_UNPRINTABLE_AREA, index + 1, cli_errors[CLI_GCODE_PATH_IN_UNPRINTABLE_AREA], sliced_info);
flush_and_exit(CLI_GCODE_PATH_IN_UNPRINTABLE_AREA);
}