Fix of crash when using raft with modified Shape-Box with height 0.5mm #5652

Reworked skirt generator to only generate skirt at non-empty layers
(layers that actually extruder object or support) and to respect minimum
layer height. Skirt generator stops at the first layer where those both
conditions cannot be met.
This commit is contained in:
Vojtech Bubnik 2021-02-25 12:18:00 +01:00
parent 1e33b95ed7
commit 43c05d35ea
4 changed files with 87 additions and 42 deletions

View file

@ -418,7 +418,7 @@ void PrintObject::generate_support_material()
{
if (this->set_started(posSupportMaterial)) {
this->clear_support_layers();
if (this->has_support_material() && m_layers.size() > 1) {
if ((this->has_support() && m_layers.size() > 1) || (this->has_raft() && ! m_layers.empty())) {
m_print->set_status(85, L("Generating support material"));
this->_generate_support_material();
m_print->throw_if_canceled();