SPE-1563: Force all toolpaths on first layer to have height equal to first layer height

This commit is contained in:
enricoturri1966 2023-03-03 09:41:21 +01:00
parent 1847ca0f9d
commit 4bb32f3b67

View File

@ -2402,7 +2402,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
if (m_forced_height > 0.0f)
m_height = m_forced_height;
else if (m_layer_id == 0)
m_height = std::min((float)m_end_position[Z], m_first_layer_height + m_z_offset);
m_height = m_first_layer_height + m_z_offset;
else if (line.comment() != INTERNAL_G2G3_TAG){
if (m_end_position[Z] > m_extruded_last_z + EPSILON && delta_pos[Z] == 0.0)
m_height = m_end_position[Z] - m_extruded_last_z;