From 36528738fe4acb4b53cc021870ad277a70dcde91 Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Fri, 19 Aug 2022 17:59:29 +0800 Subject: [PATCH] ENH: force retraction and wiping when leave external wall This can reduce dragging and reduce seams Signed-off-by: salt.wei Change-Id: I60e3c11493ca9ef00a8fd22c437f67cddac32724 --- src/libslic3r/GCode.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 74b4035957..3142d491a3 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3798,6 +3798,11 @@ bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role) return false; } + //BBS: force to retract when leave from external perimeter for a long travel + //Better way is judging whether the travel move direction is same with last extrusion move. + if (is_perimeter(m_last_processor_extrusion_role) && m_last_processor_extrusion_role != erPerimeter) + return true; + if (role == erSupportMaterial || role == erSupportTransition) { const SupportLayer* support_layer = dynamic_cast(m_layer); //FIXME support_layer->support_islands.contains should use some search structure!