diff --git a/src/libslic3r/Slicing.cpp b/src/libslic3r/Slicing.cpp index d81684e46..a6f73fba6 100644 --- a/src/libslic3r/Slicing.cpp +++ b/src/libslic3r/Slicing.cpp @@ -110,7 +110,7 @@ SlicingParameters SlicingParameters::create_from_config( params.min_layer_height = std::min(params.min_layer_height, params.layer_height); params.max_layer_height = std::max(params.max_layer_height, params.layer_height); - if (! soluble_interface || is_tree_slim(object_config.support_type.value, object_config.support_style.value)) { + if (! soluble_interface) { params.gap_raft_object = object_config.raft_contact_distance.value; //BBS params.gap_object_support = object_config.support_bottom_z_distance.value; diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 1bc315eda..d90f49690 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -2202,17 +2202,25 @@ void TreeSupport::draw_circles() } } auto &area_groups = ts_layer->area_groups; - for (auto& area : ts_layer->base_areas) { - area_groups.emplace_back(&area, SupportLayer::BaseType, max_layers_above_base); - area_groups.back().need_infill = overlaps({ area }, area_poly); + for (auto& expoly : ts_layer->base_areas) { + if (area(expoly) < SQ(scale_(1))) continue; + area_groups.emplace_back(&expoly, SupportLayer::BaseType, max_layers_above_base); + area_groups.back().need_infill = overlaps({ expoly }, area_poly); area_groups.back().need_extra_wall = need_extra_wall && !area_groups.back().need_infill; } - for (auto& area : ts_layer->roof_areas) { - area_groups.emplace_back(&area, SupportLayer::RoofType, max_layers_above_roof); + for (auto& expoly : ts_layer->roof_areas) { + if (area(expoly) < SQ(scale_(1))) continue; + area_groups.emplace_back(&expoly, SupportLayer::RoofType, max_layers_above_roof); area_groups.back().interface_id = interface_id; } - for (auto &area : ts_layer->floor_areas) area_groups.emplace_back(&area, SupportLayer::FloorType, 10000); - for (auto &area : ts_layer->roof_1st_layer) area_groups.emplace_back(&area, SupportLayer::Roof1stLayer, max_layers_above_roof1); + for (auto &expoly : ts_layer->floor_areas) { + if (area(expoly) < SQ(scale_(1))) continue; + area_groups.emplace_back(&expoly, SupportLayer::FloorType, 10000); + } + for (auto &expoly : ts_layer->roof_1st_layer) { + if (area(expoly) < SQ(scale_(1))) continue; + area_groups.emplace_back(&expoly, SupportLayer::Roof1stLayer, max_layers_above_roof1); + } for (auto &area_group : area_groups) { auto& expoly = area_group.area; @@ -3251,7 +3259,7 @@ std::vector TreeSupport::plan_layer_heights() for (int layer_nr = 0; layer_nr < contact_nodes.size(); layer_nr++) { if (contact_nodes[layer_nr].empty()) continue; SupportNode *node1 = contact_nodes[layer_nr].front(); - auto it = z_heights.lower_bound(node1->print_z - EPSILON); + auto it = z_heights.lower_bound(node1->print_z + EPSILON); if (it == z_heights.end()) it = std::prev(it); int layer_nr2 = std::distance(z_heights.begin(), it); contact_nodes2[layer_nr2].insert(contact_nodes2[layer_nr2].end(), contact_nodes[layer_nr].begin(), contact_nodes[layer_nr].end()); @@ -3267,6 +3275,7 @@ std::vector TreeSupport::plan_layer_heights() << ", object_layer_zs[" << layer_heights[layer_nr].obj_layer_nr << "]=" << m_object->get_layer(layer_heights[layer_nr].obj_layer_nr)->print_z; coordf_t new_height = layer_heights[layer_nr].height; if (std::abs(node1->height - new_height) < EPSILON) continue; + if (top_z_distance < EPSILON && node1->height < EPSILON) continue; // top_z_distance==0, this is soluable interface coordf_t accum_height = 0; int num_layers = 0; for (int i=layer_nr;i>=0;i--){ @@ -3340,9 +3349,6 @@ void TreeSupport::generate_contact_points() // } const int z_distance_top_layers = round_up_divide(scale_(z_distance_top), scale_(layer_height)) + 1; //Support must always be 1 layer below overhang. int gap_layers = z_distance_top == 0 ? 0 : 1; - // virtual layer with 0 height will be deleted - if (z_distance_top == 0) - z_distance_top = 0.001; size_t support_roof_layers = config.support_interface_top_layers.value; if (support_roof_layers > 0)