Skip to content

Commit 70931e5

Browse files
authored
Fix crash when support bottom interface layer is set to same as top (#8955)
* Fix crash when support bottom interface layer option is set to `same as top` (#8604)
1 parent b02e8bb commit 70931e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libslic3r/Support/TreeSupport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ void TreeSupport::draw_circles()
19481948
// generate areas
19491949
const coordf_t layer_height = config.layer_height.value;
19501950
const size_t top_interface_layers = config.support_interface_top_layers.value;
1951-
const size_t bottom_interface_layers = config.support_interface_bottom_layers.value;
1951+
const size_t bottom_interface_layers = config.support_interface_bottom_layers.value < 0 ? top_interface_layers : config.support_interface_bottom_layers.value;
19521952
const double nozzle_diameter = m_object->print()->config().nozzle_diameter.get_at(0);
19531953
const coordf_t line_width = config.get_abs_value("support_line_width", nozzle_diameter);
19541954
const coordf_t line_width_scaled = scale_(line_width);
@@ -2428,8 +2428,8 @@ void TreeSupport::drop_nodes()
24282428
const size_t tip_layers = base_radius / layer_height; //The number of layers to be shrinking the circle to create a tip. This produces a 45 degree angle.
24292429
const coordf_t radius_sample_resolution = m_ts_data->m_radius_sample_resolution;
24302430
const bool support_on_buildplate_only = config.support_on_build_plate_only.value;
2431-
const size_t bottom_interface_layers = config.support_interface_bottom_layers.value;
24322431
const size_t top_interface_layers = config.support_interface_top_layers.value;
2432+
const size_t bottom_interface_layers = config.support_interface_bottom_layers.value < 0 ? top_interface_layers : config.support_interface_bottom_layers.value;
24332433
SupportNode::diameter_angle_scale_factor = diameter_angle_scale_factor;
24342434
float DO_NOT_MOVER_UNDER_MM = is_slim ? 0 : 5; // do not move contact points under 5mm
24352435

0 commit comments

Comments
 (0)