From 57cbfedb256132118ab1cdbc89a5e18393eadccb Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Wed, 19 Oct 2022 10:37:45 +0800 Subject: [PATCH] ENH: regenerate wall when switch to manual brim The first layer order should be outer wall first, when the object indeed has brim. So must regenerate wall when switch to manual brim. Signed-off-by: salt.wei Change-Id: I44fd0686b7a0e836337f5e6ff8ee311ea0c7bceb --- src/libslic3r/PrintObject.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index a78bcff0298..1eb3a81487d 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -663,6 +663,14 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "top_surface_speed") { // Brim is printed below supports, support invalidates brim and skirt. steps.emplace_back(posSupportMaterial); + if (opt_key == "brim_type") { + const auto* old_brim_type = old_config.option>(opt_key); + const auto* new_brim_type = new_config.option>(opt_key); + //BBS: When switch to manual brim, the object must have brim, then re-generate perimeter + //to make the wall order of first layer to be outer-first + if (old_brim_type->value == btOuterOnly || new_brim_type->value == btOuterOnly) + steps.emplace_back(posPerimeters); + } } else if ( opt_key == "wall_loops" || opt_key == "only_one_wall_top"