From d0e31a0e615cb29f7bd4fe16fabfdf7621cec5ed Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 20 Feb 2024 14:12:06 +0100 Subject: [PATCH] CLI: If model for slicing is loaded from 3mf file, then its geometry has to be used and arrange couldn't be apply for this model. So, check a state of "dont_arrange" parameter and set it to "true", if its value is "false". --- src/PrusaSlicer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 20cfa5594a..0acdea245b 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -296,6 +296,12 @@ int CLI::run(int argc, char **argv) config += std::move(m_print_config); m_print_config = std::move(config); } + + // If model for slicing is loaded from 3mf file, then its geometry has to be used and arrange couldn't be apply for this model. + if ((boost::algorithm::iends_with(file, ".3mf") || boost::algorithm::iends_with(file, ".zip")) && !m_config.opt_bool("dont_arrange")) { + //So, check a state of "dont_arrange" parameter and set it to true, if its value is false. + m_config.set_key_value("dont_arrange", new ConfigOptionBool(true)); + } } catch (std::exception& e) { boost::nowide::cerr << file << ": " << e.what() << std::endl;