From f788722c078a94c0c0760290401f009eb8e9f014 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 10 Jan 2024 10:39:14 +0100 Subject: [PATCH] Remove all references to skip_layers CURA-11157 --- include/TreeSupportSettings.h | 6 ------ src/TreeSupport.cpp | 9 ++------- src/support.cpp | 6 ++---- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/include/TreeSupportSettings.h b/include/TreeSupportSettings.h index 53075f7d9d..1fe47514ca 100644 --- a/include/TreeSupportSettings.h +++ b/include/TreeSupportSettings.h @@ -56,7 +56,6 @@ struct TreeSupportSettings , xy_min_distance(support_overrides == SupportDistPriority::Z_OVERRIDES_XY ? mesh_group_settings.get("support_xy_distance_overhang") : xy_distance) , z_distance_top_layers(round_up_divide(mesh_group_settings.get("support_top_distance"), layer_height)) , z_distance_bottom_layers(round_up_divide(mesh_group_settings.get("support_bottom_distance"), layer_height)) - , performance_interface_skip_layers(1UL) , support_infill_angles(mesh_group_settings.get>("support_infill_angles")) , support_roof_angles(mesh_group_settings.get>("support_roof_angles")) , roof_pattern(mesh_group_settings.get("support_roof_pattern")) @@ -268,11 +267,6 @@ struct TreeSupportSettings */ size_t z_distance_bottom_layers; - /*! - * \brief used for performance optimization at the support floor. Should have no impact on the resulting tree. - */ - size_t performance_interface_skip_layers; - /*! * \brief User specified angles for the support infill. */ diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp index 145fc64bf3..87ca21a3af 100644 --- a/src/TreeSupport.cpp +++ b/src/TreeSupport.cpp @@ -69,10 +69,6 @@ TreeSupport::TreeSupport(const SliceDataStorage& storage) { added = true; grouped_mesh.second.emplace_back(mesh_idx); - // Handle some settings that are only used for performance reasons. This ensures that a horrible set setting intended to improve performance can not reduce it - // drastically. - grouped_mesh.first.performance_interface_skip_layers - = std::min(grouped_mesh.first.performance_interface_skip_layers, next_settings.performance_interface_skip_layers); } } if (! added) @@ -2206,8 +2202,7 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor size_t layers_below = 0; while (layers_below <= config.support_bottom_layers) { - // One sample at 0 layers below, another at config.support_bottom_layers. In-between samples at config.performance_interface_skip_layers distance from each - // other. + // One sample at 0 layers below, another at config.support_bottom_layers. const size_t sample_layer = static_cast(std::max(0, (static_cast(layer_idx) - static_cast(layers_below)) - static_cast(config.z_distance_bottom_layers))); constexpr bool no_support = false; @@ -2215,7 +2210,7 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector& suppor floor_layer.add(layer_outset.intersection(storage.getLayerOutlines(sample_layer, no_support, no_prime_tower))); if (layers_below < config.support_bottom_layers) { - layers_below = std::min(layers_below + config.performance_interface_skip_layers, config.support_bottom_layers); + layers_below = std::min(layers_below + 1, config.support_bottom_layers); } else { diff --git a/src/support.cpp b/src/support.cpp index 3327f91dc2..b1ebe7808c 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -1673,11 +1673,10 @@ void AreaSupport::generateSupportBottom(SliceDataStorage& storage, const SliceMe return; } const coord_t z_distance_bottom = round_up_divide(mesh.settings.get("support_bottom_distance"), layer_height); // Number of layers between support bottom and model. - const size_t skip_layer_count = 1UL; // Resolution of generating support bottoms above model. const coord_t bottom_line_width = mesh_group_settings.get("support_bottom_extruder_nr").settings_.get("support_bottom_line_width"); const coord_t bottom_outline_offset = mesh_group_settings.get("support_bottom_extruder_nr").settings_.get("support_bottom_offset"); - const size_t scan_count = std::max(size_t(1), (bottom_layer_count - 1) / skip_layer_count); // How many measurements to take to generate bottom areas. + const size_t scan_count = std::max(size_t(1), bottom_layer_count - 1); // How many measurements to take to generate bottom areas. const double z_skip = std::max( 1.0, double(bottom_layer_count - 1) / double(scan_count)); // How many layers to skip between measurements. Using float for better spread, but this is later rounded. @@ -1709,11 +1708,10 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh return; } const coord_t z_distance_top = round_up_divide(mesh.settings.get("support_top_distance"), layer_height); // Number of layers between support roof and model. - const size_t skip_layer_count = 1UL; // Resolution of generating support roof below model. const coord_t roof_line_width = mesh_group_settings.get("support_roof_extruder_nr").settings_.get("support_roof_line_width"); const coord_t roof_outline_offset = mesh_group_settings.get("support_roof_extruder_nr").settings_.get("support_roof_offset"); - const size_t scan_count = std::max(size_t(1), (roof_layer_count - 1) / skip_layer_count); // How many measurements to take to generate roof areas. + const size_t scan_count = std::max(size_t(1), roof_layer_count - 1); // How many measurements to take to generate roof areas. const double z_skip = std::max( 1.0, double(roof_layer_count - 1) / double(scan_count)); // How many layers to skip between measurements. Using float for better spread, but this is later rounded.