mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
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
|
@ -209,22 +209,20 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
||||||
out += _utf8(L("Recommended object thin wall thickness: Not available due to invalid layer height."));
|
out += _utf8(L("Recommended object thin wall thickness: Not available due to invalid layer height."));
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
Flow external_perimeter_flow = Flow::new_from_config_width(
|
|
||||||
frExternalPerimeter,
|
|
||||||
*print_config.opt<ConfigOptionFloatOrPercent>("external_perimeter_extrusion_width"),
|
|
||||||
nozzle_diameter, layer_height);
|
|
||||||
Flow perimeter_flow = Flow::new_from_config_width(
|
|
||||||
frPerimeter,
|
|
||||||
*print_config.opt<ConfigOptionFloatOrPercent>("perimeter_extrusion_width"),
|
|
||||||
nozzle_diameter, layer_height);
|
|
||||||
|
|
||||||
|
|
||||||
if (num_perimeters > 0) {
|
if (num_perimeters > 0) {
|
||||||
int num_lines = std::min(num_perimeters * 2, 10);
|
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() + " ";
|
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
|
// Start with the width of two closely spaced
|
||||||
try {
|
try {
|
||||||
|
Flow external_perimeter_flow = Flow::new_from_config_width(
|
||||||
|
frExternalPerimeter,
|
||||||
|
*print_config.opt<ConfigOptionFloatOrPercent>("external_perimeter_extrusion_width"),
|
||||||
|
nozzle_diameter, layer_height);
|
||||||
|
Flow perimeter_flow = Flow::new_from_config_width(
|
||||||
|
frPerimeter,
|
||||||
|
*print_config.opt<ConfigOptionFloatOrPercent>("perimeter_extrusion_width"),
|
||||||
|
nozzle_diameter, layer_height);
|
||||||
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…
Add table
Add a link
Reference in a new issue