diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2021-01-02 15:13:54 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2021-01-04 16:21:24 +0300 |
commit | 837070a246050023bbbdb03a968dfd54ef0776b8 (patch) | |
tree | 9ef6de2ea224ab4c702425a4821d0a32e469af56 | |
parent | 7a41ab20ed5909ea8282d00ae539c15fe2165589 (diff) |
Hotfix of a crash with raft and one-layer object (#5652)
The problem is that PrintObject support generator is only run when m_layers.size() > 1, so one-layer object will skip it.
It apparently never worked, after recent refactoring (probably 8bfc986) it started to crash in GCode generator.
This commit fixes the crash, but not the problem. The raft is still not generated (like in all versions since 2.0.0 at least).
-rw-r--r-- | src/libslic3r/GCode.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index b07db889c..f19185f9e 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1709,7 +1709,9 @@ namespace Skirt { //FIXME infinite or high skirt does not make sense for sequential print! (skirt_done.size() < (size_t)print.config().skirt_height.value || print.has_infinite_skirt()) && // This print_z has not been extruded yet (sequential print) - skirt_done.back() < layer_tools.print_z - EPSILON && + // FIXME: The skirt_done should not be empty at this point. The check is a workaround + // of https://github.com/prusa3d/PrusaSlicer/issues/5652, but it deserves a real fix. + (! skirt_done.empty() && skirt_done.back() < layer_tools.print_z - EPSILON) && // and this layer is an object layer, or it is a raft layer. (layer_tools.has_object || support_layer->id() < (size_t)support_layer->object()->config().raft_layers.value)) { #if 0 |