From 994f0f5086b7c96dabc96c5f30d288db3fef6d3d Mon Sep 17 00:00:00 2001 From: zackaree-shen Date: Tue, 11 Aug 2026 20:39:44 +0800 Subject: [PATCH] fix: keep support interface intact with variable layer heights - Skip trimming the top contact layer by the object layer it directly supports: that layer's lslices cover the overhang itself and must not be used to trim the very contact layer supporting it - Previously this layer was excluded only by an EPSILON boundary coincidence of the trimming window; with variable layer heights the synchronised gap is shorter than the configured gap, so the supported layer fell inside the trimming window and its lslices trimmed ~80% of the contact area, leaving only fragmented support interface --- src/libslic3r/Support/SupportMaterial.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libslic3r/Support/SupportMaterial.cpp b/src/libslic3r/Support/SupportMaterial.cpp index 8b993dda21eb..dd98863dc378 100644 --- a/src/libslic3r/Support/SupportMaterial.cpp +++ b/src/libslic3r/Support/SupportMaterial.cpp @@ -3157,6 +3157,15 @@ void PrintObjectSupportMaterial::trim_support_layers_by_object( if (object_layer.bottom_z() > support_layer.print_z + gap_extra_above - EPSILON) break; + // Skip the object layer directly supported by this top contact layer: its lslices + // cover the overhang itself, so trimming by it would cut away the contact area. + // With variable layer heights the synchronised gap is shorter than the configured + // gap, so this layer used to fall inside the trimming window and removed ~80% of + // the contact surface. + if (support_layer.layer_type == SupporLayerType::TopContact && + i == support_layer.idx_object_layer_above) + continue; + bool is_overlap = is_layers_overlap(support_layer, object_layer); for (const ExPolygon& expoly : object_layer.lslices) { // BBS