Don't split travel for deceleration if there is no need for.

supermerill/SuperSlicer#1560
This commit is contained in:
supermerill 2021-11-06 17:02:14 +01:00
parent 57c82dbe72
commit 038bfa59a3

View File

@ -3949,7 +3949,7 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
acceleration = std::min(max_acceleration, m_config.infill_acceleration.get_abs_value(acceleration)); acceleration = std::min(max_acceleration, m_config.infill_acceleration.get_abs_value(acceleration));
} }
} }
if (travel_acceleration <= acceleration) { if (travel_acceleration <= acceleration || travel_acceleration == 0 || acceleration == 0) {
m_writer.set_acceleration((uint32_t)floor(acceleration + 0.5)); m_writer.set_acceleration((uint32_t)floor(acceleration + 0.5));
// go to first point of extrusion path (stop at midpoint to let us set the decel speed) // go to first point of extrusion path (stop at midpoint to let us set the decel speed)
if (!m_last_pos_defined || m_last_pos != path.first_point()) { if (!m_last_pos_defined || m_last_pos != path.first_point()) {