From ab7c688a727f5a2ab59fce53314c29be8901c43d Mon Sep 17 00:00:00 2001 From: supermerill Date: Sun, 29 Nov 2020 00:40:17 +0100 Subject: [PATCH] update to infill_anchor integration --- resources/ui_layout/print.ui | 8 +++++--- src/libslic3r/Fill/FillBase.cpp | 4 ++-- src/libslic3r/PrintConfig.cpp | 17 ++++++++--------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/resources/ui_layout/print.ui b/resources/ui_layout/print.ui index 9fff051cb..34844e6ce 100644 --- a/resources/ui_layout/print.ui +++ b/resources/ui_layout/print.ui @@ -85,7 +85,7 @@ group:Modifying slices setting:width$6:curve_smoothing_precision setting:width$6:curve_smoothing_angle_convex setting:width$6:curve_smoothing_angle_concave - setting:label_width$6:width$6:curve_smoothing_cutoff_dist + setting:width$6:curve_smoothing_cutoff_dist end_line line:XY compensation setting:width$6:xy_size_compensation @@ -107,9 +107,11 @@ group:title_width$8:Infill setting:width$5:label$_:sidetext_width$1:fill_density setting:label_width$1:label$_:fill_pattern setting:label$_:width$18:infill_connection - setting:sidetext_width$7:infill_anchor - setting:sidetext_width$7:infill_anchor_max end_line + line:_ + setting:label$Connection length:label_width$20:sidetext_width$7:width$12:infill_anchor_max + setting:label$Perimeter anchor:sidetext_width$7:width$12:infill_anchor + end_line line:Solid setting:label_width$11:label$_:solid_fill_pattern setting:label$_:width$18:infill_connection_solid diff --git a/src/libslic3r/Fill/FillBase.cpp b/src/libslic3r/Fill/FillBase.cpp index 56d3d2ede..8cf4a2baf 100644 --- a/src/libslic3r/Fill/FillBase.cpp +++ b/src/libslic3r/Fill/FillBase.cpp @@ -2477,14 +2477,14 @@ void connect_infill(Polylines&& infill_ordered, const std::vectorsidetext = L("mm or %"); def->ratio_over = "infill_extrusion_width"; def->gui_type = "f_enum_open"; @@ -1900,15 +1900,14 @@ void PrintConfigDef::init_fff_params() def->enum_values.push_back("5"); def->enum_values.push_back("10"); def->enum_values.push_back("1000"); - def->enum_labels.push_back(L("0 (Simple connect)")); + def->enum_labels.push_back(L("0 (no open anchors)")); def->enum_labels.push_back("1 mm"); def->enum_labels.push_back("2 mm"); def->enum_labels.push_back("5 mm"); def->enum_labels.push_back("10 mm"); def->enum_labels.push_back(L("1000 (unlimited)")); - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloatOrPercent(1000, false)); - def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloatOrPercent(600, true)); def = this->add("infill_anchor_max", coFloatOrPercent); def->label = L("Maximum length of the infill anchor"); @@ -1918,19 +1917,19 @@ void PrintConfigDef::init_fff_params() "PrusaSlicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment " "shorter than this parameter is found, the infill line is connected to a perimeter segment at just one side " "and the length of the perimeter segment taken is limited to infill_anchor, but no longer than this parameter. " - "Set this parameter to zero to disable anchoring."); + "\nIf set to 0, the old algorithm for infill connection will be used, it should create the same result as with 1000 & 0."); def->sidetext = def_infill_anchor_min->sidetext; def->ratio_over = def_infill_anchor_min->ratio_over; def->gui_type = def_infill_anchor_min->gui_type; def->enum_values = def_infill_anchor_min->enum_values; - def->enum_labels.push_back(L("0 (not anchored)")); + def->enum_labels.push_back(L("0 (Simple connect)")); def->enum_labels.push_back("1 mm"); def->enum_labels.push_back("2 mm"); def->enum_labels.push_back("5 mm"); def->enum_labels.push_back("10 mm"); def->enum_labels.push_back(L("1000 (unlimited)")); - def->mode = def_infill_anchor_min->mode; - def->set_default_value(new ConfigOptionFloatOrPercent(50, false)); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); def = this->add("infill_dense", coBool); def->label = ("");