From b5878b18388fc8e69ae70c3f8b3cb667774a0b07 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Mon, 29 May 2023 17:08:37 +0800 Subject: [PATCH] FIX: wipe tower is not generated with different filament layer range Change-Id: Ica876c3a94a3edb23eb723a1f3c37e2d10549af9 --- src/libslic3r/Print.cpp | 6 ++++++ src/slic3r/GUI/PartPlate.cpp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 635802ba32..66f05756a0 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -295,6 +295,12 @@ std::vector Print::object_extruders() const extruders.push_back(extruder - 1); } } + + // layer range + for (auto layer_range : mo->layer_config_ranges) { + if (layer_range.second.has("extruder")) + extruders.push_back(layer_range.second.option("extruder")->getInt() - 1); + } } #endif sort_remove_duplicates(extruders); diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index c8d8c3f9e7..abe615d132 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -1282,6 +1282,13 @@ std::vector PartPlate::get_extruders(bool conside_custom_gcode) const plate_extruders.insert(plate_extruders.end(), volume_extruders.begin(), volume_extruders.end()); } + // layer range + for (auto layer_range : mo->layer_config_ranges) { + if (layer_range.second.has("extruder")) { + plate_extruders.push_back(layer_range.second.option("extruder")->getInt()); + } + } + bool obj_support = false; const ConfigOption* obj_support_opt = mo->config.option("enable_support"); const ConfigOption *obj_raft_opt = mo->config.option("raft_layers");