mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 21:35:54 +08:00
allow to add gapfill after the last perimeter
supermerill/SuperSlicer#982
This commit is contained in:
parent
8a927576ec
commit
474e202a65
@ -55,6 +55,7 @@ group:Advanced
|
||||
line:Gap Fill
|
||||
setting:label$_:gap_fill
|
||||
setting:width$5:gap_fill_min_area
|
||||
setting:width$5:gap_fill_last
|
||||
end_line
|
||||
line:Seam
|
||||
setting:label_width$12:sidetext_width$0:seam_position
|
||||
|
@ -158,6 +158,7 @@ void Layer::make_perimeters()
|
||||
&& config.extra_perimeters_odd_layers == other_config.extra_perimeters_odd_layers
|
||||
&& config.extra_perimeters_overhangs == other_config.extra_perimeters_overhangs
|
||||
&& config.gap_fill == other_config.gap_fill
|
||||
&& config.gap_fill_last == other_config.gap_fill_last
|
||||
&& config.gap_fill_min_area == other_config.gap_fill_min_area
|
||||
&& config.gap_fill_overlap == other_config.gap_fill_overlap
|
||||
&& config.gap_fill_speed == other_config.gap_fill_speed
|
||||
|
@ -638,7 +638,7 @@ void PerimeterGenerator::process()
|
||||
// look for gaps
|
||||
if (this->config->gap_fill
|
||||
//check if we are going to have an other perimeter
|
||||
&& (i <= loop_number || has_overhang || next_onion.empty()))
|
||||
&& (i <= loop_number || has_overhang || next_onion.empty() || (this->config->gap_fill_last.value && i == loop_number+1)))
|
||||
// not using safety offset here would "detect" very narrow gaps
|
||||
// (but still long enough to escape the area threshold) that gap fill
|
||||
// won't be able to fill but we'd still remove from infill area
|
||||
|
@ -515,6 +515,7 @@ const std::vector<std::string>& Preset::print_options()
|
||||
"travel_speed", "travel_speed_z",
|
||||
// gapfill
|
||||
"gap_fill",
|
||||
"gap_fill_last",
|
||||
"gap_fill_min_area",
|
||||
"gap_fill_overlap",
|
||||
"gap_fill_speed",
|
||||
|
@ -1876,6 +1876,14 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
def = this->add("gap_fill_last", coBool);
|
||||
def->label = L("after last perimeter");
|
||||
def->full_label = L("Gapfill after last perimeter");
|
||||
def->category = OptionCategory::perimeter;
|
||||
def->tooltip = L("All gaps between the alst periemter and the infill which are thinner than a perimeter will be filled by gapfill.");
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool{true });
|
||||
|
||||
def = this->add("gap_fill_min_area", coFloatOrPercent);
|
||||
def->label = L("Min surface");
|
||||
def->full_label = L("Min gap-fill surface");
|
||||
@ -1884,7 +1892,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->ratio_over = "perimeter_width_square";
|
||||
def->min = 0;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent{ 100,true });
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent{100, true });
|
||||
|
||||
def = this->add("gap_fill_overlap", coPercent);
|
||||
def->label = L("Gap fill overlap");
|
||||
@ -5494,6 +5502,7 @@ void PrintConfigDef::to_prusa(t_config_option_key& opt_key, std::string& value,
|
||||
"gap_fill",
|
||||
"gap_fill_min_area",
|
||||
"gap_fill_overlap",
|
||||
"gap_fill_infill",
|
||||
"infill_dense",
|
||||
"infill_connection",
|
||||
"infill_dense_algo",
|
||||
|
@ -790,6 +790,7 @@ public:
|
||||
ConfigOptionPercent fill_smooth_distribution;
|
||||
ConfigOptionFloatOrPercent fill_smooth_width;
|
||||
ConfigOptionBool gap_fill;
|
||||
ConfigOptionBool gap_fill_last;
|
||||
ConfigOptionFloatOrPercent gap_fill_min_area;
|
||||
ConfigOptionPercent gap_fill_overlap;
|
||||
ConfigOptionFloat gap_fill_speed;
|
||||
@ -905,6 +906,7 @@ protected:
|
||||
OPT_PTR(fill_smooth_distribution);
|
||||
OPT_PTR(fill_smooth_width);
|
||||
OPT_PTR(gap_fill);
|
||||
OPT_PTR(gap_fill_last);
|
||||
OPT_PTR(gap_fill_min_area);
|
||||
OPT_PTR(gap_fill_overlap);
|
||||
OPT_PTR(gap_fill_speed);
|
||||
|
@ -678,6 +678,7 @@ namespace Slic3r {
|
||||
for (const t_config_option_key& opt_key : opt_keys) {
|
||||
if (
|
||||
opt_key == "gap_fill"
|
||||
|| opt_key == "gap_fill_last"
|
||||
|| opt_key == "gap_fill_min_area"
|
||||
|| opt_key == "only_one_perimeter_top"
|
||||
|| opt_key == "only_one_perimeter_top_other_algo"
|
||||
|
@ -377,7 +377,8 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
||||
|
||||
toggle_field("perimeter_loop_seam", config->opt_bool("perimeter_loop"));
|
||||
|
||||
toggle_field("gap_fill_min_area", config->opt_bool("gap_fill"));
|
||||
for (auto el : { "gap_fill_last", "gap_fill_min_area" })
|
||||
toggle_field(el, config->opt_bool("gap_fill"));
|
||||
|
||||
toggle_field("avoid_crossing_not_first_layer", config->opt_bool("avoid_crossing_perimeters"));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user