From eb0117b1c12d6bda5efc5856d7241d4b074f5876 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 3 Oct 2017 13:22:37 +0200 Subject: [PATCH] Fix of https://github.com/prusa3d/Slic3r/issues/492 When a layer contained the support interface only, it was errorneously printed with the support base material. --- xs/src/libslic3r/GCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 260884942..48bf28882 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1014,7 +1014,7 @@ void GCode::process_layer( // the interface may be interleaved with the support base. bool single_extruder = ! has_support || support_extruder == interface_extruder; // Assign an extruder to the base. - ObjectByExtruder &obj = object_by_extruder(by_extruder, support_extruder, &layer_to_print - layers.data(), layers.size()); + ObjectByExtruder &obj = object_by_extruder(by_extruder, has_support ? support_extruder : interface_extruder, &layer_to_print - layers.data(), layers.size()); obj.support = &support_layer.support_fills; obj.support_extrusion_role = single_extruder ? erMixed : erSupportMaterial; if (! single_extruder && has_interface) {