From d257c0f90dccbf74e54c23a61a0b94d8458b71e7 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 24 Nov 2023 19:40:21 +0800 Subject: [PATCH] FIX: Revert "ENH: do not leave a gap for top... Revert "ENH: do not leave a gap for top interface if the top z distance is 0" This reverts commit 79ea32c7cbbdb7e689637980af7c36caf42284c9. Revert reason: the supports are impossible to remove in some cases. jira: STUDIO-5385 Change-Id: I376a6f4dfd78da6dfea68b9ac3d552cddd0b4272 (cherry picked from commit 34e38b705fde7f5d7f9a3a89c96a3627ce0c998e) --- src/libslic3r/Support/SupportMaterial.cpp | 4 +--- src/libslic3r/Support/TreeSupport.cpp | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/Support/SupportMaterial.cpp b/src/libslic3r/Support/SupportMaterial.cpp index 297bc31e9..a85e744b7 100644 --- a/src/libslic3r/Support/SupportMaterial.cpp +++ b/src/libslic3r/Support/SupportMaterial.cpp @@ -3278,9 +3278,7 @@ void PrintObjectSupportMaterial::trim_support_layers_by_object( // perimeter's width. $support contains the full shape of support // material, thus including the width of its foremost extrusion. // We leave a gap equal to a full extrusion width. - // arthur: do not leave a gap for top interface if the top z distance is 0. - if (support_layer.layer_type != sltTopContact || m_slicing_params.gap_support_object != 0) - support_layer.polygons = diff(support_layer.polygons, polygons_trimming); + support_layer.polygons = diff(support_layer.polygons, polygons_trimming); } }); BOOST_LOG_TRIVIAL(debug) << "PrintObjectSupportMaterial::trim_support_layers_by_object() in parallel - end"; diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index dedbc8574..3943ae79a 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -2337,9 +2337,8 @@ void TreeSupport::draw_circles(const std::vector>& contact_no roof_1st_layer = std::move(offset2_ex(roof_1st_layer, contact_dist_scaled, -contact_dist_scaled)); // avoid object - // arthur: do not leave a gap for top interface if the top z distance is 0. See STUDIO-3991 - Polygons avoid_region_interface = get_trim_support_regions(*m_object, ts_layer, m_slicing_params.gap_object_support, m_slicing_params.gap_support_object, - m_slicing_params.gap_support_object == 0 ? 0 : m_ts_data->m_xy_distance); + //ExPolygons avoid_region_interface = m_ts_data->get_collision(m_ts_data->m_xy_distance, layer_nr); + Polygons avoid_region_interface = get_trim_support_regions(*m_object, ts_layer, m_slicing_params.gap_object_support, m_slicing_params.gap_support_object, m_ts_data->m_xy_distance); if (has_circle_node) { roof_areas = avoid_object_remove_extra_small_parts(roof_areas, avoid_region_interface); roof_1st_layer = avoid_object_remove_extra_small_parts(roof_1st_layer, avoid_region_interface);