Skip to content

Commit

Permalink
[CURA-11157] Remove 'support_interface_skip_height' setting (#2009)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo authored Jan 10, 2024
2 parents 60c94ef + 279dab7 commit f31b2c6
Show file tree
Hide file tree
Showing 71 changed files with 4 additions and 97 deletions.
6 changes: 0 additions & 6 deletions include/TreeSupportSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ struct TreeSupportSettings
, xy_min_distance(support_overrides == SupportDistPriority::Z_OVERRIDES_XY ? mesh_group_settings.get<coord_t>("support_xy_distance_overhang") : xy_distance)
, z_distance_top_layers(round_up_divide(mesh_group_settings.get<coord_t>("support_top_distance"), layer_height))
, z_distance_bottom_layers(round_up_divide(mesh_group_settings.get<coord_t>("support_bottom_distance"), layer_height))
, performance_interface_skip_layers(round_up_divide(mesh_group_settings.get<coord_t>("support_interface_skip_height"), layer_height))
, support_infill_angles(mesh_group_settings.get<std::vector<AngleDegrees>>("support_infill_angles"))
, support_roof_angles(mesh_group_settings.get<std::vector<AngleDegrees>>("support_roof_angles"))
, roof_pattern(mesh_group_settings.get<EFillMethod>("support_roof_pattern"))
Expand Down Expand Up @@ -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.
*/
Expand Down
9 changes: 2 additions & 7 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -2206,16 +2202,15 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector<Polygons>& 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. In-between samples at 1-layer distance from each other.
const size_t sample_layer
= static_cast<size_t>(std::max(0, (static_cast<int>(layer_idx) - static_cast<int>(layers_below)) - static_cast<int>(config.z_distance_bottom_layers)));
constexpr bool no_support = false;
constexpr bool no_prime_tower = false;
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 + 1UL, config.support_bottom_layers);
}
else
{
Expand Down
8 changes: 2 additions & 6 deletions src/support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1673,12 +1673,10 @@ void AreaSupport::generateSupportBottom(SliceDataStorage& storage, const SliceMe
return;
}
const coord_t z_distance_bottom = round_up_divide(mesh.settings.get<coord_t>("support_bottom_distance"), layer_height); // Number of layers between support bottom and model.
const size_t skip_layer_count
= std::max(uint64_t(1), round_divide(mesh.settings.get<coord_t>("support_interface_skip_height"), layer_height)); // Resolution of generating support bottoms above model.
const coord_t bottom_line_width = mesh_group_settings.get<ExtruderTrain&>("support_bottom_extruder_nr").settings_.get<coord_t>("support_bottom_line_width");
const coord_t bottom_outline_offset = mesh_group_settings.get<ExtruderTrain&>("support_bottom_extruder_nr").settings_.get<coord_t>("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.
Expand Down Expand Up @@ -1710,12 +1708,10 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh
return;
}
const coord_t z_distance_top = round_up_divide(mesh.settings.get<coord_t>("support_top_distance"), layer_height); // Number of layers between support roof and model.
const size_t skip_layer_count
= std::max(uint64_t(1), round_divide(mesh.settings.get<coord_t>("support_interface_skip_height"), layer_height)); // Resolution of generating support roof below model.
const coord_t roof_line_width = mesh_group_settings.get<ExtruderTrain&>("support_roof_extruder_nr").settings_.get<coord_t>("support_roof_line_width");
const coord_t roof_outline_offset = mesh_group_settings.get<ExtruderTrain&>("support_roof_extruder_nr").settings_.get<coord_t>("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.
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/001.settings
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ speed_wall_0_roofing=45
bottom_skin_preshrink=0
min_feature_size=0.1
brim_replaces_support=True
support_interface_skip_height=0.2
prime_tower_wipe_enabled=True
gantry_height=320
material_surface_energy=70
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/002.settings
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.1
support_interface_height=0.8
support_brim_enable=True
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
acceleration_travel=500
Expand Down Expand Up @@ -970,7 +969,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=45
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
infill_before_walls=False
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/003.settings
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.2
support_interface_height=0.96
support_brim_enable=True
support_interface_skip_height=0.12
jerk_support_infill=12.0
wall_overhang_speed_factor=100
acceleration_travel=500
Expand Down Expand Up @@ -971,7 +970,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=50
support_interface_skip_height=0.12
jerk_support_infill=12.0
wall_overhang_speed_factor=100
infill_before_walls=False
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/004.settings
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.2
support_interface_height=0.8
support_brim_enable=True
support_interface_skip_height=0.1
jerk_support_infill=8
wall_overhang_speed_factor=100
acceleration_travel=500
Expand Down Expand Up @@ -971,7 +970,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=55
support_interface_skip_height=0.1
jerk_support_infill=8
wall_overhang_speed_factor=100
infill_before_walls=False
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/005.settings
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.2
support_interface_height=0.8
support_brim_enable=True
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
acceleration_travel=500
Expand Down Expand Up @@ -972,7 +971,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=65.0
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
infill_before_walls=False
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/006.settings
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.2
support_interface_height=0.8
support_brim_enable=True
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
acceleration_travel=500
Expand Down Expand Up @@ -972,7 +971,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=60.0
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
infill_before_walls=False
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/007.settings
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.2
support_interface_height=0.8
support_brim_enable=True
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
acceleration_travel=500
Expand Down Expand Up @@ -972,7 +971,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=45
support_interface_skip_height=0.2
jerk_support_infill=8
wall_overhang_speed_factor=100
infill_before_walls=False
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/008.settings
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ ironing_line_spacing=0.1
material_bed_temp_prepend=True
infill_before_walls=True
material=0
support_interface_skip_height=0.15
blackmagic=0
support_brim_line_count=3
infill_support_enabled=False
Expand Down Expand Up @@ -1091,7 +1090,6 @@ machine_feeder_wheel_diameter=10.0
bridge_skin_support_threshold=50
prime_tower_min_volume=6
roofing_material_flow=100
support_interface_skip_height=0.15
infill_wall_line_count=0
support_supported_skin_fan_speed=100
bridge_sparse_infill_max_density=0
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/009.settings
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ ironing_line_spacing=0.1
material_bed_temp_prepend=True
infill_before_walls=True
material=0
support_interface_skip_height=0.15
blackmagic=0
support_brim_line_count=3
infill_support_enabled=False
Expand Down Expand Up @@ -1091,7 +1090,6 @@ machine_feeder_wheel_diameter=10.0
bridge_skin_support_threshold=50
prime_tower_min_volume=6
roofing_material_flow=100
support_interface_skip_height=0.15
infill_wall_line_count=0
support_supported_skin_fan_speed=100
bridge_sparse_infill_max_density=0
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/010.settings
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ ironing_line_spacing=0.1
material_bed_temp_prepend=True
infill_before_walls=True
material=0
support_interface_skip_height=0.15
blackmagic=0
support_brim_line_count=3
infill_support_enabled=False
Expand Down Expand Up @@ -1091,7 +1090,6 @@ machine_feeder_wheel_diameter=10.0
bridge_skin_support_threshold=50
prime_tower_min_volume=6
roofing_material_flow=100
support_interface_skip_height=0.15
infill_wall_line_count=0
support_supported_skin_fan_speed=100
bridge_sparse_infill_max_density=0
Expand Down
2 changes: 0 additions & 2 deletions stress_benchmark/resources/011.settings
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ support_tree_max_diameter_increase_by_merges_when_support_to_model=1
adaptive_layer_height_threshold=0.2
support_interface_height=1
support_brim_enable=True
support_interface_skip_height=0.2
jerk_support_infill=20
wall_overhang_speed_factor=100
acceleration_travel=5000
Expand Down Expand Up @@ -972,7 +971,6 @@ machine_extruders_shared_nozzle_initial_retraction=0
extruder_prime_pos_abs=False
support_tower_maximum_supported_diameter=3.0
support_tree_angle=50
support_interface_skip_height=0.2
jerk_support_infill=20
wall_overhang_speed_factor=100
infill_before_walls=True
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/012.settings
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ prime_tower_position_y=118.80000000000001
mesh_position_x=0
mold_width=5
adhesion_extruder_nr=0
support_interface_skip_height=0.2
jerk_support_infill=12.5
wall_overhang_speed_factor=100
material_bed_temp_prepend=True
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/013.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=2.4
clean_between_layers=False
support_interface_skip_height=0.1
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/014.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=1.2000000000000002
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/015.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/016.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/017.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.84
clean_between_layers=False
support_interface_skip_height=0.12
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/018.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/019.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/020.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.25
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/021.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=0.5
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.15
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/022.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8400000000000001
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/023.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/024.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.1
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/025.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.1
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/026.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.06
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/027.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=2
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.15
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/028.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=1.6
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=False
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/029.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=1.2000000000000002
clean_between_layers=False
support_interface_skip_height=0.2
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
1 change: 0 additions & 1 deletion stress_benchmark/resources/030.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ resolution=0
_plugin__curaenginegradualflow__0_1_0__layer_0_max_flow_acceleration=1
skin_preshrink=0.8
clean_between_layers=False
support_interface_skip_height=0.1
machine_feeder_wheel_diameter=10.0
retraction_hop_only_when_collides=True
machine_steps_per_mm_y=50
Expand Down
Loading

1 comment on commit f31b2c6

@rburema
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: f31b2c6 Previous: ef02842 Ratio
SimplifyTestFixture/simplify_slot_noplugin 1.2383240449525816 ns/iter 0.9296277747552755 ns/iter 1.33

This comment was automatically generated by workflow using github-action-benchmark.

CC: @nallath @jellespijker @wawanbreton @casperlamboo @saumyaj3 @HellAholic

Please sign in to comment.