Fixing a regression crash in Preset Hints.
This commit is contained in:
parent
0bfc53f5a5
commit
a1283277d3
1 changed files with 8 additions and 10 deletions
|
@ -210,6 +210,11 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (num_perimeters > 0) {
|
||||||
|
int num_lines = std::min(num_perimeters * 2, 10);
|
||||||
|
out += (boost::format(_utf8(L("Recommended object thin wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
||||||
|
// Start with the width of two closely spaced
|
||||||
|
try {
|
||||||
Flow external_perimeter_flow = Flow::new_from_config_width(
|
Flow external_perimeter_flow = Flow::new_from_config_width(
|
||||||
frExternalPerimeter,
|
frExternalPerimeter,
|
||||||
*print_config.opt<ConfigOptionFloatOrPercent>("external_perimeter_extrusion_width"),
|
*print_config.opt<ConfigOptionFloatOrPercent>("external_perimeter_extrusion_width"),
|
||||||
|
@ -218,13 +223,6 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
||||||
frPerimeter,
|
frPerimeter,
|
||||||
*print_config.opt<ConfigOptionFloatOrPercent>("perimeter_extrusion_width"),
|
*print_config.opt<ConfigOptionFloatOrPercent>("perimeter_extrusion_width"),
|
||||||
nozzle_diameter, layer_height);
|
nozzle_diameter, layer_height);
|
||||||
|
|
||||||
|
|
||||||
if (num_perimeters > 0) {
|
|
||||||
int num_lines = std::min(num_perimeters * 2, 10);
|
|
||||||
out += (boost::format(_utf8(L("Recommended object thin wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
|
||||||
// Start with the width of two closely spaced
|
|
||||||
try {
|
|
||||||
double width = external_perimeter_flow.width() + external_perimeter_flow.spacing();
|
double width = external_perimeter_flow.width() + external_perimeter_flow.spacing();
|
||||||
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) {
|
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) {
|
||||||
if (i > 2)
|
if (i > 2)
|
||||||
|
|
Loading…
Reference in a new issue