From ee3e8fc515bb1e122d2174ea2e63a56c3914c1bd Mon Sep 17 00:00:00 2001 From: wintergua Date: Tue, 21 Feb 2023 15:00:54 +0800 Subject: [PATCH] ENH: restore inner and outerinner brim modes 1) the function is not released to public Change-Id: Ia1b5a31db3b1b1864997b57fe875c01f3ea9fb08 (cherry picked from commit a816cc313659f87978e1275b98f43172cb416a59) --- src/libslic3r/Brim.cpp | 7 +++++-- src/libslic3r/PrintConfig.cpp | 23 +++++++++++++++-------- src/libslic3r/PrintConfig.hpp | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/libslic3r/Brim.cpp b/src/libslic3r/Brim.cpp index 7dfac2b361..a9e0b1cc84 100644 --- a/src/libslic3r/Brim.cpp +++ b/src/libslic3r/Brim.cpp @@ -892,12 +892,15 @@ static ExPolygons outer_inner_brim_area(const Print& print, // BBS: inner and outer boundary are offset from the same polygon incase of round off error. auto innerExpoly = offset_ex(ex_poly.contour, brim_offset, jtRound, SCALED_RESOLUTION); append(brim_area_object, diff_ex(offset_ex(innerExpoly, brim_width_mod, jtRound, SCALED_RESOLUTION), innerExpoly)); - // BBS: brim should be apart from holes - append(no_brim_area_object, diff_ex(ex_poly_holes_reversed, offset_ex(ex_poly_holes_reversed, -scale_(5.)))); + } if (brim_type == BrimType::btInnerOnly || brim_type == BrimType::btOuterAndInner) { append(brim_area_object, diff_ex(offset_ex(ex_poly_holes_reversed, -brim_offset), offset_ex(ex_poly_holes_reversed, -brim_width - brim_offset))); } + if (brim_type != BrimType::btInnerOnly && brim_type != BrimType::btOuterAndInner) { + // BBS: brim should be apart from holes + append(no_brim_area_object, diff_ex(ex_poly_holes_reversed, offset_ex(ex_poly_holes_reversed, -scale_(5.)))); + } if (brim_type == BrimType::btInnerOnly || brim_type == BrimType::btNoBrim) append(no_brim_area_object, diff_ex(offset(ex_poly.contour, no_brim_offset), ex_poly_holes_reversed)); if (brim_type == BrimType::btNoBrim) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index a0b82494d8..2f755615dd 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -768,15 +768,22 @@ void PrintConfigDef::init_fff_params() def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); def->enum_values.emplace_back("auto_brim"); def->enum_values.emplace_back("outer_only"); - def->enum_values.emplace_back("no_brim"); - //def->enum_values.emplace_back("inner_only"); - //def->enum_values.emplace_back("outer_and_inner"); - def->enum_labels.emplace_back(L("Auto")); - def->enum_labels.emplace_back(L("Manual")); - def->enum_labels.emplace_back(L("No-brim")); +#if !BBL_RELEASE_TO_PUBLIC // BBS: The following two types are disabled - //def->enum_labels.emplace_back(L("Inner brim only")); - //def->enum_labels.emplace_back(L("Outer and inner brim")); + def->enum_values.emplace_back("inner_only"); + def->enum_values.emplace_back("outer_and_inner"); +#endif + def->enum_values.emplace_back("no_brim"); + + def->enum_labels.emplace_back(L("Auto")); + def->enum_labels.emplace_back(L("Outer brim only")); +#if !BBL_RELEASE_TO_PUBLIC + // BBS: The following two types are disabled + def->enum_labels.emplace_back(L("Inner brim only")); + def->enum_labels.emplace_back(L("Outer and inner brim")); +#endif + def->enum_labels.emplace_back(L("No-brim")); + def->mode = comSimple; def->set_default_value(new ConfigOptionEnum(btAutoBrim)); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 4747068d98..f266c935d9 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -150,9 +150,9 @@ enum SLAPillarConnectionMode { enum BrimType { btAutoBrim, // BBS btOuterOnly, - btNoBrim, btInnerOnly, btOuterAndInner, + btNoBrim, }; enum TimelapseType : int {