diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp index e92eb0a2ba9..ddb608901fa 100644 --- a/src/libslic3r/Layer.cpp +++ b/src/libslic3r/Layer.cpp @@ -181,6 +181,7 @@ void Layer::make_perimeters() && config.opt_serialize("outer_wall_line_width") == other_config.opt_serialize("outer_wall_line_width") && config.detect_thin_wall == other_config.detect_thin_wall && config.infill_wall_overlap == other_config.infill_wall_overlap + && config.top_bottom_infill_wall_overlap == other_config.top_bottom_infill_wall_overlap && config.fuzzy_skin == other_config.fuzzy_skin && config.fuzzy_skin_thickness == other_config.fuzzy_skin_thickness && config.fuzzy_skin_point_distance == other_config.fuzzy_skin_point_distance diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 86f9f5ceac1..8cdf36238d0 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -2138,10 +2138,17 @@ void PerimeterGenerator::process_classic() ext_perimeter_spacing / 2 : // two or more loops? perimeter_spacing / 2; + // only apply infill overlap if we actually have one perimeter coord_t infill_peri_overlap = 0; + coord_t top_infill_peri_overlap = 0; if (inset > 0) { - infill_peri_overlap = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale(inset + solid_infill_spacing / 2)))); + if(this->layer_id == 0 || this->upper_slices == nullptr){ + infill_peri_overlap = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale(inset + solid_infill_spacing / 2)))); + }else{ + infill_peri_overlap = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale(inset + solid_infill_spacing / 2)))); + top_infill_peri_overlap = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale(inset + solid_infill_spacing / 2)))); + } inset -= infill_peri_overlap; } // simplify infill contours according to resolution @@ -2160,7 +2167,7 @@ void PerimeterGenerator::process_classic() //if any top_fills, grow them by ext_perimeter_spacing/2 to have the real un-anchored fill ExPolygons top_infill_exp = intersection_ex(fill_clip, offset_ex(top_fills, double(ext_perimeter_spacing / 2))); if (!top_fills.empty()) { - infill_exp = union_ex(infill_exp, offset_ex(top_infill_exp, double(infill_peri_overlap))); + infill_exp = union_ex(infill_exp, offset_ex(top_infill_exp, double(top_infill_peri_overlap))); } this->fill_surfaces->append(infill_exp, stInternal); @@ -2866,8 +2873,14 @@ ExPolygons infill_contour = union_ex(wallToolPaths.getInnerContour()); ext_perimeter_spacing : // two or more loops? perimeter_spacing; - - inset = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale(inset)))); + coord_t top_inset = inset; + + top_inset = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale(inset)))); + if(is_topmost_layer || is_bottom_layer) + inset = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale(inset)))); + else + inset = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale(inset)))); + // simplify infill contours according to resolution Polygons pp; for (ExPolygon& ex : infill_contour) @@ -2882,7 +2895,7 @@ ExPolygons infill_contour = union_ex(wallToolPaths.getInnerContour()); float(inset + min_perimeter_infill_spacing / 2.)); // append infill areas to fill_surfaces if (!top_fills.empty()) { - infill_exp = union_ex(infill_exp, offset_ex(top_fills, double(inset))); + infill_exp = union_ex(infill_exp, offset_ex(top_fills, double(top_inset))); } this->fill_surfaces->append(infill_exp, stInternal); diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index f6426739dec..826358f0b13 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -793,7 +793,7 @@ static std::vector s_Preset_print_options { "sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament","support_interface_not_for_body", "ooze_prevention", "standby_temperature_delta", "interface_shells", "line_width", "initial_layer_line_width", "inner_wall_line_width", "outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width", - "top_surface_line_width", "support_line_width", "infill_wall_overlap", "bridge_flow", "internal_bridge_flow", + "top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow", "elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower", "prime_tower_width", "prime_tower_brim_width", "prime_volume", "wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 07b461e60cb..b74fadbf987 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2680,11 +2680,20 @@ def = this->add("filament_loading_speed", coFloats); def = this->add("infill_wall_overlap", coPercent); def->label = L("Infill/Wall overlap"); def->category = L("Strength"); - def->tooltip = L("Infill area is enlarged slightly to overlap with wall for better bonding. The percentage value is relative to line width of sparse infill"); + def->tooltip = L("Infill area is enlarged slightly to overlap with wall for better bonding. The percentage value is relative to line width of sparse infill. Set this value to ~10-15% to minimize potential over extrusion and accumulation of material resulting in rough top surfaces."); def->sidetext = L("%"); def->ratio_over = "inner_wall_line_width"; def->mode = comAdvanced; def->set_default_value(new ConfigOptionPercent(15)); + + def = this->add("top_bottom_infill_wall_overlap", coPercent); + def->label = L("Top/Bottom solid infill/wall overlap"); + def->category = L("Strength"); + def->tooltip = L("Top solid infill area is enlarged slightly to overlap with wall for better bonding and to minimize the appearance of pinholes where the top infill meets the walls. A value of 25-30% is a good starting point, minimising the appearance of pinholes. The percentage value is relative to line width of sparse infill"); + def->sidetext = L("%"); + def->ratio_over = "inner_wall_line_width"; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionPercent(25)); def = this->add("sparse_infill_speed", coFloat); def->label = L("Sparse infill"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 74d630004d6..9d6c88a2b82 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -894,6 +894,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionInt, sparse_infill_filament)) ((ConfigOptionFloatOrPercent, sparse_infill_line_width)) ((ConfigOptionPercent, infill_wall_overlap)) + ((ConfigOptionPercent, top_bottom_infill_wall_overlap)) ((ConfigOptionFloat, sparse_infill_speed)) //BBS ((ConfigOptionBool, infill_combination)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 1cce64d9f8d..78f3e69fa56 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -926,6 +926,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "initial_layer_line_width" || opt_key == "inner_wall_line_width" || opt_key == "infill_wall_overlap" + || opt_key == "top_bottom_infill_wall_overlap" || opt_key == "seam_gap" || opt_key == "role_based_wipe_speed" || opt_key == "wipe_on_loops" diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index d228e16b040..30bbbd85944 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -110,7 +110,7 @@ std::map> SettingsFactory::PART_CAT { L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1}, {"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1}, {"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1}, - {"infill_combination", "",1}, {"infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1} + {"infill_combination", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1} }}, { L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5}, {"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10}, diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 4adc314d3b9..2bd2f1ea551 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2120,6 +2120,7 @@ void TabPrint::build() optgroup->append_single_option_line("bottom_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface"); optgroup->append_single_option_line("bottom_shell_layers"); optgroup->append_single_option_line("bottom_shell_thickness"); + optgroup->append_single_option_line("top_bottom_infill_wall_overlap"); optgroup = page->new_optgroup(L("Infill"), L"param_infill"); optgroup->append_single_option_line("sparse_infill_density"); @@ -2129,9 +2130,9 @@ void TabPrint::build() optgroup->append_single_option_line("internal_solid_infill_pattern"); optgroup->append_single_option_line("gap_fill_target"); optgroup->append_single_option_line("filter_out_gap_fill"); + optgroup->append_single_option_line("infill_wall_overlap"); optgroup = page->new_optgroup(L("Advanced"), L"param_advanced"); - optgroup->append_single_option_line("infill_wall_overlap"); optgroup->append_single_option_line("infill_direction"); optgroup->append_single_option_line("solid_infill_direction"); optgroup->append_single_option_line("rotate_solid_infill_direction");