Fix GCode viewer first layer height in vase mode (#2051)

Follow-up of 6be84d529d740c44c1e9bf533e70e167b3442063 - Fixed processing of spiral vase mode in GCodeProcessor::process_G1

Co-authored-by: enricoturri1966 <enricoturri@seznam.cz>
This commit is contained in:
Noisyfox 2023-09-10 11:38:37 +08:00 committed by GitHub
parent 303a722795
commit f2da5b39a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3093,7 +3093,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
}
if (m_spiral_vase_active && !m_result.spiral_vase_layers.empty()) {
if (m_result.spiral_vase_layers.back().first == FLT_MAX && delta_pos[Z] > 0.0)
if (m_result.spiral_vase_layers.back().first == FLT_MAX && delta_pos[Z] >= 0.0)
// replace layer height placeholder with correct value
m_result.spiral_vase_layers.back().first = static_cast<float>(m_end_position[Z]);
if (!m_result.moves.empty())