From 6cc753508248d1ce62a0fec505a17ae344456e9f Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Mon, 26 Dec 2022 18:01:20 +0800 Subject: [PATCH] ENH: don't generate detour travel when position is unclear Detour travel is wrong in multi color printing when current position is unclear. Don't generate detour travel in this case to avoid colour mixture. Signed-off-by: salt.wei Change-Id: I2d24b04d99b8a0b34a46c9f88e522e97cb0fe354 --- src/libslic3r/GCode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index e6336e2bf68..b90198dfd57 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3777,7 +3777,9 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string // multi-hop travel path inside the configuration space if (needs_retraction && m_config.reduce_crossing_wall - && ! m_avoid_crossing_perimeters.disabled_once()) { + && ! m_avoid_crossing_perimeters.disabled_once() + //BBS: don't generate detour travel paths when current position is unclear + && m_writer.is_current_position_clear()) { travel = m_avoid_crossing_perimeters.travel_to(*this, point, &could_be_wipe_disabled); // check again whether the new travel path still needs a retraction needs_retraction = this->needs_retraction(travel, role);