Skip to content

Commit

Permalink
#8032 - GCodeProcessor - Fixed parsing of LAYER_CHANGE tag for spiral…
Browse files Browse the repository at this point in the history
… vase mode
  • Loading branch information
enricoturri1966 authored and lukasmatena committed Mar 23, 2022
1 parent dc14ae0 commit fab6619
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/libslic3r/GCode/GCodeProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1919,12 +1919,15 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
++m_layer_id;
#if ENABLE_SPIRAL_VASE_LAYERS
if (m_spiral_vase_active) {
assert(!m_result.moves.empty());
size_t move_id = m_result.moves.size() - 1;
if (!m_result.spiral_vase_layers.empty() && m_end_position[Z] == m_result.spiral_vase_layers.back().first)
m_result.spiral_vase_layers.back().second.second = move_id;
else
m_result.spiral_vase_layers.push_back({ static_cast<float>(m_end_position[Z]), { move_id, move_id } });
if (m_result.moves.empty())
m_result.spiral_vase_layers.push_back({ m_first_layer_height, { 0, 0 } });
else {
const size_t move_id = m_result.moves.size() - 1;
if (!m_result.spiral_vase_layers.empty() && m_end_position[Z] == m_result.spiral_vase_layers.back().first)
m_result.spiral_vase_layers.back().second.second = move_id;
else
m_result.spiral_vase_layers.push_back({ static_cast<float>(m_end_position[Z]), { move_id, move_id } });
}
}
#endif // ENABLE_SPIRAL_VASE_LAYERS
return;
Expand Down

0 comments on commit fab6619

Please sign in to comment.