diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index d59148ad51..cb37471e45 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -959,6 +959,17 @@ void PerimeterGenerator::process_classic() this->object_config->brim_type == BrimType::btOuterOnly && this->object_config->brim_width.value > 0)) entities.reverse(); + //BBS. adjust wall generate seq + else if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill) + if (entities.entities.size() > 1){ + int last_outer=0; + int outer = 0; + for (; outer < entities.entities.size(); ++outer) + if (entities.entities[outer]->role() == erExternalPerimeter && outer - last_outer > 1) { + std::swap(entities.entities[outer], entities.entities[outer - 1]); + last_outer = outer; + } + } // append perimeters for this slice as a collection if (! entities.empty()) this->loops->append(entities); @@ -1279,6 +1290,17 @@ void PerimeterGenerator::process_arachne() } } } + // BBS. adjust wall generate seq + if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill) + if (ordered_extrusions.size() > 1) { + int last_outer = 0; + int outer = 0; + for (; outer < ordered_extrusions.size(); ++outer) + if (ordered_extrusions[outer].extrusion->inset_idx == 0 && outer - last_outer > 1) { + std::swap(ordered_extrusions[outer], ordered_extrusions[outer - 1]); + last_outer = outer; + } + } if (ExtrusionEntityCollection extrusion_coll = traverse_extrusions(*this, ordered_extrusions); !extrusion_coll.empty()) this->loops->append(extrusion_coll); diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 99d8377263..1315e2c1e9 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -148,7 +148,8 @@ static t_config_enum_values s_keys_map_WallInfillOrder { { "inner wall/outer wall/infill", int(WallInfillOrder::InnerOuterInfill) }, { "outer wall/inner wall/infill", int(WallInfillOrder::OuterInnerInfill) }, { "infill/inner wall/outer wall", int(WallInfillOrder::InfillInnerOuter) }, - { "infill/outer wall/inner wall", int(WallInfillOrder::InfillOuterInner) } + { "infill/outer wall/inner wall", int(WallInfillOrder::InfillOuterInner) }, + { "inner-outer-inner wall/infill", int(WallInfillOrder::InnerOuterInnerInfill)} }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(WallInfillOrder) @@ -1015,10 +1016,12 @@ void PrintConfigDef::init_fff_params() def->enum_values.push_back("outer wall/inner wall/infill"); def->enum_values.push_back("infill/inner wall/outer wall"); def->enum_values.push_back("infill/outer wall/inner wall"); + def->enum_values.push_back("inner-outer-inner wall/infill"); def->enum_labels.push_back(L("inner/outer/infill")); def->enum_labels.push_back(L("outer/inner/infill")); def->enum_labels.push_back(L("infill/inner/outer")); def->enum_labels.push_back(L("infill/outer/inner")); + def->enum_labels.push_back(L("inner-outer-inner/infill")); def->mode = comAdvanced; def->set_default_value(new ConfigOptionEnum(WallInfillOrder::InnerOuterInfill)); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 837b3cf94f..1565b25532 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -71,6 +71,7 @@ enum class WallInfillOrder { OuterInnerInfill, InfillInnerOuter, InfillOuterInner, + InnerOuterInnerInfill, Count, }; //BBS