From 62241ab090c485498a72b782aea2bda978615776 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 16 Jul 2026 23:41:34 +0200 Subject: [PATCH 1/3] Don't take support into account w.r.t. seam overhang. fix for ticket CURA-13054 --- src/FffGcodeWriter.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index dfa51260e3..cc9d350cee 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2595,6 +2595,7 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( } } } + Shape non_support_outlines_below = outlines_below; const coord_t layer_height = mesh_config.inset0_config.getLayerThickness(); @@ -2684,18 +2685,19 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( } const Shape fully_supported_region = outlines_below.offset(-half_outer_wall_width); + const Shape model_supported_region = non_support_outlines_below.offset(-half_outer_wall_width); const Shape part_print_region = part.outline.offset(-half_outer_wall_width); - const auto get_supported_region = [&fully_supported_region, &layer_height](const AngleDegrees& overhang_angle) -> Shape + const auto get_supported_region = [&fully_supported_region, &model_supported_region, &layer_height](const AngleDegrees& overhang_angle, bool full = true) -> Shape { // the overhang mask is set to the area of the current part's outline minus the region that is considered to be supported - // the supported region is made up of those areas that really are supported by either model or support on the layer below + // the supported region is made up of those areas that really are supported by (either) the model (or support, if 'full') on the layer below // expanded to take into account the overhang angle, the greater the overhang angle, the larger the supported area is // considered to be if (overhang_angle < 90.0) { const coord_t overhang_width = layer_height * std::tan(AngleRadians(overhang_angle)); - return fully_supported_region.offset(overhang_width + 10); + return (full ? fully_supported_region : model_supported_region).offset(overhang_width + 10); } return Shape(); @@ -2758,7 +2760,8 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( const AngleDegrees seam_overhang_angle = mesh.settings.get("seam_overhang_angle"); if (seam_overhang_angle < 90.0) { - const Shape supported_region_seam = get_supported_region(seam_overhang_angle); + constexpr bool not_full = false; // Do not take support into account for the seam overhang. + const Shape supported_region_seam = get_supported_region(seam_overhang_angle, not_full); gcode_layer.setSeamOverhangMask(part_print_region.difference(supported_region_seam).offset(10)); } else From 93f5d54c32156f2f5e8144401639e002a5d88a82 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Mon, 20 Jul 2026 10:55:36 +0200 Subject: [PATCH 2/3] Prevent copying data CURA-13054 --- src/FffGcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index cc9d350cee..c8f1a0f92f 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2595,7 +2595,7 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( } } } - Shape non_support_outlines_below = outlines_below; + const Shape& non_support_outlines_below = outlines_below; const coord_t layer_height = mesh_config.inset0_config.getLayerThickness(); From 56e4257def9118b268e30aafc0974da9c529f9cc Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 21 Jul 2026 11:00:43 +0200 Subject: [PATCH 3/3] Calculate correct overhangs CURA-13504 --- src/FffGcodeWriter.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index c8f1a0f92f..be48f39c0e 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -2749,7 +2749,11 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( for (const auto& regions : merged_regions) { const SpeedRegion& last_region = *ranges::prev(regions.end()); - overhang_masks.push_back(LayerPlan::OverhangMask{ get_supported_region(last_region.overhang_angle), last_region.speed_factor }); + constexpr bool not_full = false; // Do not take support into account for the seam overhang. + overhang_masks.push_back(LayerPlan::OverhangMask{ + get_supported_region(last_region.overhang_angle, not_full), + last_region.speed_factor, + }); } } } @@ -2760,8 +2764,8 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( const AngleDegrees seam_overhang_angle = mesh.settings.get("seam_overhang_angle"); if (seam_overhang_angle < 90.0) { - constexpr bool not_full = false; // Do not take support into account for the seam overhang. - const Shape supported_region_seam = get_supported_region(seam_overhang_angle, not_full); + constexpr bool full = true; // Do not take support into account for the seam overhang. + const Shape supported_region_seam = get_supported_region(seam_overhang_angle, full); gcode_layer.setSeamOverhangMask(part_print_region.difference(supported_region_seam).offset(10)); } else