Squash merge of lh_brim_rework,

brim separated to Brim.cpp,hpp
Refactored accessors to PrintObjectPtrs, PrintRegionPtrs, LayerPtrs,
SupportLayerPtrs for const correctness.
This commit is contained in:
Vojtech Bubnik 2021-02-03 15:12:53 +01:00
parent e52efe48b0
commit 73c9f939e0
37 changed files with 803 additions and 243 deletions

View file

@ -5680,7 +5680,7 @@ void GLCanvas3D::_load_print_toolpaths()
if (!print->is_step_done(psSkirt) || !print->is_step_done(psBrim))
return;
if (!print->has_skirt() && (print->config().brim_width.value == 0))
if (!print->has_skirt() && !print->has_brim())
return;
const float color[] = { 0.5f, 1.0f, 0.5f, 1.0f }; // greenish
@ -5692,7 +5692,7 @@ void GLCanvas3D::_load_print_toolpaths()
total_layer_count = std::max(total_layer_count, print_object->total_layer_count());
}
size_t skirt_height = print->has_infinite_skirt() ? total_layer_count : std::min<size_t>(print->config().skirt_height.value, total_layer_count);
if ((skirt_height == 0) && (print->config().brim_width.value > 0))
if ((skirt_height == 0) && print->has_brim())
skirt_height = 1;
// Get first skirt_height layers.