From 80c9f5316707a20411895cced910775b77bdcb72 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 20 Nov 2023 15:27:39 +0100 Subject: [PATCH] Fixed issues in wipe tower brim (SPE-2049, #11708) --- src/libslic3r/GCode/WipeTowerIntegration.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode/WipeTowerIntegration.cpp b/src/libslic3r/GCode/WipeTowerIntegration.cpp index 71ebe0bea5..4b51d27c6e 100644 --- a/src/libslic3r/GCode/WipeTowerIntegration.cpp +++ b/src/libslic3r/GCode/WipeTowerIntegration.cpp @@ -162,11 +162,12 @@ std::string WipeTowerIntegration::post_process_wipe_tower_moves(const WipeTower: line_out << ch; } + line = line_out.str(); + boost::trim(line); // Remove leading and trailing spaces. + transformed_pos = Eigen::Rotation2Df(angle) * pos + translation; - if (transformed_pos != old_pos || never_skip) { - line = line_out.str(); - boost::trim_left(line); // Remove leading spaces + if (transformed_pos != old_pos || never_skip || ! line.empty()) { std::ostringstream oss; oss << std::fixed << std::setprecision(3) << "G1"; if (transformed_pos.x() != old_pos.x() || never_skip)