Fix crash in multi-material segmentation when there wasn't any input polygon for some layer.

This commit is contained in:
Lukáš Hejl 2024-12-20 12:53:54 +01:00
parent 4f5bd3ff5b
commit 5c7888b114

View File

@ -1801,6 +1801,9 @@ std::vector<std::vector<ExPolygons>> segmentation_by_painting(const PrintObject
throw_on_cancel_callback();
std::vector<ColorProjectionLines> &input_polygons_projection_lines = input_polygons_projection_lines_layers[layer_idx];
if (input_polygons_projection_lines.empty()) {
continue;
}
if constexpr (MM_SEGMENTATION_DEBUG_COLOR_RANGES) {
export_color_projection_lines_color_ranges_to_svg(debug_out_path("mm-color-ranges-%d.svg", layer_idx), input_polygons_projection_lines, input_expolygons[layer_idx]);