diff --git a/src/libslic3r/Support/TreeSupport3D.cpp b/src/libslic3r/Support/TreeSupport3D.cpp index bb6b0df04..94f7eb6ae 100644 --- a/src/libslic3r/Support/TreeSupport3D.cpp +++ b/src/libslic3r/Support/TreeSupport3D.cpp @@ -4331,6 +4331,11 @@ static void generate_support_areas(Print &print, TreeSupport* tree_support, cons SupportGeneratorLayersPtr raft_layers = generate_raft_base(print_object, support_params, print_object.slicing_parameters(), top_contacts, interface_layers, base_interface_layers, intermediate_layers, layer_storage); SupportGeneratorLayersPtr layers_sorted = generate_support_layers(print_object, raft_layers, bottom_contacts, top_contacts, intermediate_layers, interface_layers, base_interface_layers); + // BBS: This is a hack to avoid the support being generated outside the bed area. See #4769. + for (SupportGeneratorLayer *layer : layers_sorted) { + if (layer) layer->polygons = intersection(layer->polygons, volumes.m_bed_area); + } + // Don't fill in the tree supports, make them hollow with just a single sheath line. print.set_status(69, _L("Generating support")); generate_support_toolpaths(print_object.support_layers(), print_object.config(), support_params, print_object.slicing_parameters(), @@ -4584,9 +4589,10 @@ void organic_draw_branches( std::vector slices = slice_mesh(partial_mesh, slice_z, mesh_slicing_params, throw_on_cancel); bottom_contacts.clear(); //FIXME parallelize? - for (LayerIndex i = 0; i < LayerIndex(slices.size()); ++i) - slices[i] = diff_clipped(slices[i], volumes.getCollision(0, layer_begin + i, true)); //FIXME parent_uses_min || draw_area.element->state.use_min_xy_dist); - + for (LayerIndex i = 0; i < LayerIndex(slices.size()); ++i) { + slices[i] = diff_clipped(slices[i], volumes.getCollision(0, layer_begin + i, true)); // FIXME parent_uses_min || draw_area.element->state.use_min_xy_dist); + slices[i] = intersection(slices[i], volumes.m_bed_area); + } size_t num_empty = 0; if (slices.front().empty()) { // Some of the initial layers are empty. diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 5920ffb46..136a0f140 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -682,8 +682,6 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_field("support_filament", have_support_material || have_skirt); toggle_line("raft_contact_distance", have_raft && !have_support_soluble); - for (auto el : { "raft_first_layer_density"}) - toggle_line(el, have_raft); bool has_ironing = (config->opt_enum("ironing_type") != IroningType::NoIroning); for (auto el : { diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index a3a092a13..04dab7a58 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2047,7 +2047,7 @@ void TabPrint::build() page = add_options_page(L("Support"), "support"); optgroup = page->new_optgroup(L("Support"), L"param_support"); - optgroup->append_single_option_line("enable_support", "support"); + optgroup->append_single_option_line("enable_support", "support"); optgroup->append_single_option_line("support_type", "support#support-types"); optgroup->append_single_option_line("support_style", "support#support-styles"); optgroup->append_single_option_line("support_threshold_angle", "support#threshold-angle"); @@ -2059,7 +2059,6 @@ void TabPrint::build() optgroup = page->new_optgroup(L("Raft"), L"param_raft"); optgroup->append_single_option_line("raft_layers"); optgroup->append_single_option_line("raft_contact_distance"); - optgroup->append_single_option_line("raft_first_layer_density"); optgroup = page->new_optgroup(L("Support filament"), L"param_support_filament"); optgroup->append_single_option_line("support_filament", "support#support-filament"); @@ -2070,7 +2069,8 @@ void TabPrint::build() //BBS optgroup = page->new_optgroup(L("Advanced"), L"param_advanced"); - optgroup->append_single_option_line("raft_first_layer_expansion"); // not only for raft, but for support too + optgroup->append_single_option_line("raft_first_layer_density"); // not only for raft, but for support too + optgroup->append_single_option_line("raft_first_layer_expansion"); // not only for raft, but for support too optgroup->append_single_option_line("tree_support_wall_count"); optgroup->append_single_option_line("support_top_z_distance", "support#top-z-distance"); optgroup->append_single_option_line("support_bottom_z_distance", "support#bottom-z-distance");