Tweaked clamping of max toolpaths width

This commit is contained in:
enricoturri1966 2020-12-14 15:11:38 +01:00
parent 9605e235b8
commit cdb05d103a

View File

@ -1773,7 +1773,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
m_width = delta_pos[E] * static_cast<float>(M_PI * sqr(filament_radius)) / (delta_xyz * m_height) + static_cast<float>(1.0 - 0.25 * M_PI) * m_height;
// clamp width to avoid artifacts which may arise from wrong values of m_height
m_width = std::min(m_width, 1.0f);
m_width = std::min(m_width, std::max(1.0f, 4.0f * m_height));
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
m_width_compare.update(m_width, m_extrusion_role);