From 2e0a8dcf30aabf32fb2f9873b6a0fea3d8c168e9 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 31 May 2023 16:27:01 +0800 Subject: [PATCH] FIX: reduce normal node in buildplate_only mode If support_on_buildplate_only is enabled, and a node will fall into the object, this node should not be a normal node. Jira: STUDIO-3047 Change-Id: I65dc6d69d28729732907111c3b34b4d32edff806 (cherry picked from commit d04dc35d45c171e20899cb391d3b192fa123c10e) --- src/libslic3r/TreeSupport.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 22a694b1d..5446f97c3 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -2968,7 +2968,7 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) } } } - #if 0 + #if 1 // delete nodes with no children (means either it's a single layer nodes, or the branch has been deleted but not completely) for (size_t layer_nr = contact_nodes.size() - 1; layer_nr > 0; layer_nr--){ auto layer_contact_nodes = contact_nodes[layer_nr]; @@ -3343,12 +3343,14 @@ void TreeSupport::generate_contact_points(std::vectortype = ePolygon; - contact_node->overhang = &overhang_part; - curr_nodes.emplace_back(contact_node); - continue; + if (!(config.support_on_build_plate_only && is_inside_ex(m_ts_data->m_layer_outlines_below[layer_nr], candidate))) { + Node* contact_node = new Node(candidate, -z_distance_top_layers, layer_nr, support_roof_layers + z_distance_top_layers, true, Node::NO_PARENT, print_z, + height, z_distance_top); + contact_node->type = ePolygon; + contact_node->overhang = &overhang_part; + curr_nodes.emplace_back(contact_node); + continue; + } } overhang_bounds.inflated(half_overhang_distance);