From bd2cbea202b459cfdfa17389dfa27b9b033f3954 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 15 Feb 2021 11:39:25 +0100 Subject: [PATCH] Fix aligned seam when sequential printing is enabled --- src/libslic3r/GCode/SeamPlacer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/GCode/SeamPlacer.cpp b/src/libslic3r/GCode/SeamPlacer.cpp index b57d4470b..9738a0016 100644 --- a/src/libslic3r/GCode/SeamPlacer.cpp +++ b/src/libslic3r/GCode/SeamPlacer.cpp @@ -786,16 +786,16 @@ void SeamPlacer::apply_custom_seam(const Polygon& polygon, size_t po_idx, std::optional SeamHistory::get_last_seam(const PrintObject* po, size_t layer_id, const BoundingBox& island_bb) { - assert(layer_id >= m_layer_id); - if (layer_id > m_layer_id) { + assert(layer_id >= m_layer_id || layer_id == 0); + if (layer_id != m_layer_id) { // Get seam was called for different layer than last time. + if (layer_id == 0) // seq printing + m_data_this_layer.clear(); m_data_last_layer = m_data_this_layer; m_data_this_layer.clear(); m_layer_id = layer_id; } - - std::optional out; auto seams_it = m_data_last_layer.find(po);