From 053f7e6344da114ebbc0b1af120f46c73f8af3c6 Mon Sep 17 00:00:00 2001 From: Pavel Mikus Date: Tue, 13 Jun 2023 11:15:24 +0200 Subject: [PATCH] SPE-1769: fix issue https://github.com/prusa3d/PrusaSlicer/issues/10786 Split regions if dynamic overhang settings differ. I also tried the same with bridge_speed, but for some reason it does not work at all. --- src/libslic3r/Layer.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp index 842544c24..9d658841c 100644 --- a/src/libslic3r/Layer.cpp +++ b/src/libslic3r/Layer.cpp @@ -656,12 +656,22 @@ void Layer::make_perimeters() layer_region_ids.push_back(region_id); for (LayerRegionPtrs::const_iterator it = layerm + 1; it != m_regions.end(); ++it) if (! (*it)->slices().empty()) { - LayerRegion* other_layerm = *it; - const PrintRegionConfig &other_config = other_layerm->region().config(); - if (config.perimeter_extruder == other_config.perimeter_extruder + LayerRegion *other_layerm = *it; + const PrintRegionConfig &other_config = other_layerm->region().config(); + bool dynamic_overhang_speed_compatibility = config.enable_dynamic_overhang_speeds == + other_config.enable_dynamic_overhang_speeds; + if (dynamic_overhang_speed_compatibility && config.enable_dynamic_overhang_speeds) { + dynamic_overhang_speed_compatibility = config.overhang_speed_0 == other_config.overhang_speed_0 && + config.overhang_speed_1 == other_config.overhang_speed_1 && + config.overhang_speed_2 == other_config.overhang_speed_2 && + config.overhang_speed_3 == other_config.overhang_speed_3; + } + + if (config.perimeter_extruder == other_config.perimeter_extruder && config.perimeters == other_config.perimeters && config.perimeter_speed == other_config.perimeter_speed && config.external_perimeter_speed == other_config.external_perimeter_speed + && dynamic_overhang_speed_compatibility && (config.gap_fill_enabled ? config.gap_fill_speed.value : 0.) == (other_config.gap_fill_enabled ? other_config.gap_fill_speed.value : 0.) && config.overhangs == other_config.overhangs