Skip to content

Commit

Permalink
Hotfix of a crash with raft and one-layer object (#5652)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
lukasmatena committed Jan 4, 2021
1 parent 7a41ab2 commit 837070a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libslic3r/GCode.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 837070a

Please sign in to comment.