diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2021-11-30 19:51:53 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2021-11-30 19:52:05 +0300 |
commit | 4158f9ec8ed94886d4687c327dce976b083d8ba4 (patch) | |
tree | 1add7ec27155640604ad541d278dbf6ffce4919d /src/libslic3r/PrintConfig.cpp | |
parent | efaf4e47c1c94f78bc75568a778731c29b24bcfd (diff) |
New config value "gcode_resolution" replaces the hard coded RESOLUTION
value, which was set to 0.0125mm.
Diffstat (limited to 'src/libslic3r/PrintConfig.cpp')
-rw-r--r-- | src/libslic3r/PrintConfig.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 7af71fe30..4ab893bef 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2072,7 +2072,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionInt(0)); def = this->add("resolution", coFloat); - def->label = L("Resolution"); + def->label = L("Slice resolution"); def->tooltip = L("Minimum detail resolution, used to simplify the input file for speeding up " "the slicing job and reducing memory usage. High-resolution models often carry " "more detail than printers can render. Set to zero to disable any simplification " @@ -2082,6 +2082,18 @@ void PrintConfigDef::init_fff_params() def->mode = comExpert; def->set_default_value(new ConfigOptionFloat(0)); + def = this->add("gcode_resolution", coFloat); + def->label = L("G-code resolution"); + def->tooltip = L("Maximum deviation of exported G-code paths from their full resolution counterparts. " + "Very high resolution G-code requires huge amount of RAM to slice and preview, " + "also a 3D printer may stutter not being able to process a high resolution G-code in a timely manner. " + "On the other hand, a low resolution G-code will produce a low poly effect and because " + "the G-code reduction is performed at each layer independently, visible artifacts may be produced."); + def->sidetext = L("mm"); + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloat(0.0125)); + def = this->add("retract_before_travel", coFloats); def->label = L("Minimum travel after retraction"); def->tooltip = L("Retraction is not triggered when travel moves are shorter than this length."); @@ -3940,6 +3952,10 @@ void DynamicPrintConfig::normalize_fdm() this->opt<ConfigOptionPercent>("fill_density", true)->value = 0; } } + + if (auto *opt_gcode_resolution = this->opt<ConfigOptionFloat>("gcode_resolution", false); opt_gcode_resolution) + // Resolution will be above 1um. + opt_gcode_resolution->value = std::max(opt_gcode_resolution->value, 0.001); } void handle_legacy_sla(DynamicPrintConfig &config) |