#6828 - Clamping of toolpaths width performed only for gcodes files produced by 3rd part softwares (Tech ENABLE_CLAMP_TOOLPATHS_WIDTH)
This commit is contained in:
parent
ad41c3f01c
commit
7b4c98d727
2 changed files with 15 additions and 0 deletions
src/libslic3r/GCode
|
@ -2252,8 +2252,14 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
|
|||
// cross section: rectangle + 2 semicircles
|
||||
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;
|
||||
|
||||
#if ENABLE_CLAMP_TOOLPATHS_WIDTH
|
||||
if (m_producers_enabled && m_producer != EProducer::PrusaSlicer)
|
||||
// clamp width to avoid artifacts which may arise from wrong values of m_height
|
||||
m_width = std::min(m_width, std::max(1.0f, 4.0f * m_height));
|
||||
#else
|
||||
// clamp width to avoid artifacts which may arise from wrong values of m_height
|
||||
m_width = std::min(m_width, std::max(1.0f, 4.0f * m_height));
|
||||
#endif // ENABLE_CLAMP_TOOLPATHS_WIDTH
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
m_width_compare.update(m_width, m_extrusion_role);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue