From da7353dd6b70db820aab7505dcfc71698a73906c Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 21 Apr 2023 11:36:43 +0800 Subject: [PATCH] FIX: contact_polygons were not accurate and interface missing In normal support, contact_polygons were slightly larger than allowed region, so sampling to the wrong points, which were then removed when "on buildplate only" was turned on. Jira: STUDIO-2742 Github: issue 1352 Change-Id: I2f131bac48eb30997f37818f312da3386516a5ea (cherry picked from commit ed25a89c0e8c5358ea803344fbce482be172d2ee) --- src/libslic3r/SupportMaterial.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 38b3a9d514..5b0a31facc 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -1790,13 +1790,21 @@ static inline std::tuple detect_contacts( // For the same reason, the non-bridging support area may be smaller than the bridging support area! slices_margin_update(std::min(lower_layer_offset, float(scale_(gap_xy))), no_interface_offset); // Offset the contact polygons outside. - - // BBS: already trim the support in trim_support_layers_by_object() #if 0 + for (size_t i = 0; i < NUM_MARGIN_STEPS; ++ i) { + diff_polygons = diff( + offset( + diff_polygons, + scaled(SUPPORT_MATERIAL_MARGIN / NUM_MARGIN_STEPS), + ClipperLib::jtRound, + // round mitter limit + scale_(0.05)), + slices_margin.polygons); + } +#else diff_polygons = diff(diff_polygons, slices_margin.polygons); #endif } - polygons_append(contact_polygons, diff_polygons); } // for each layer.region