Fix freeze/crash happening when slicing with 0 perimeters

This commit is contained in:
PavelMikus 2023-03-03 11:44:40 +01:00
parent 9da3bfb009
commit 39df7582c0

View file

@ -355,6 +355,8 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
shell_width += 0.5f * external_perimeter_flow.scaled_width() + external_perimeter_flow.scaled_spacing();
shell_width += perimeter_flow.scaled_spacing() * (num_perimeters - 1);
} else {
// TODO: Maybe there is better solution when printing with zero perimeters, but this works reasonably well, given the situation
shell_width = SCALED_EPSILON;
}
// Scaled expansions of the respective external surfaces.