Fix of the previous commit: zero extrusion width parameter is

always valid, it is replaced with an "auto" value.
This commit is contained in:
bubnikv 2019-08-06 15:36:16 +02:00
parent 74e592ceaa
commit 9905f8d349

View file

@ -1251,7 +1251,9 @@ std::string Print::validate() const
auto validate_extrusion_width = [min_nozzle_diameter, max_nozzle_diameter](const ConfigBase &config, const char *opt_key, double layer_height, std::string &err_msg) -> bool {
double extrusion_width_min = config.get_abs_value(opt_key, min_nozzle_diameter);
double extrusion_width_max = config.get_abs_value(opt_key, max_nozzle_diameter);
if (extrusion_width_min <= layer_height) {
if (extrusion_width_min == 0) {
// Default "auto-generated" extrusion width is always valid.
} else if (extrusion_width_min <= layer_height) {
err_msg = (boost::format(L("%1%=%2% mm is too low to be printable at a layer height %3% mm")) % opt_key % extrusion_width_min % layer_height).str();
return false;
} else if (extrusion_width_max >= max_nozzle_diameter * 2.) {