ENH: force retraction and wiping when leave external wall

This can reduce dragging and reduce seams

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I60e3c11493ca9ef00a8fd22c437f67cddac32724
This commit is contained in:
salt.wei 2022-08-19 17:59:29 +08:00 committed by Lane.Wei
parent 83a9459837
commit 36528738fe

View file

@ -3798,6 +3798,11 @@ bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role)
return false; 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) { if (role == erSupportMaterial || role == erSupportTransition) {
const SupportLayer* support_layer = dynamic_cast<const SupportLayer*>(m_layer); const SupportLayer* support_layer = dynamic_cast<const SupportLayer*>(m_layer);
//FIXME support_layer->support_islands.contains should use some search structure! //FIXME support_layer->support_islands.contains should use some search structure!