mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Extend short-travel smoothing to external overhang walls (#11975)
This commit is contained in:
@@ -7091,9 +7091,16 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
|||||||
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) {
|
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) {
|
||||||
jerk_to_set = m_config.initial_layer_jerk.value;
|
jerk_to_set = m_config.initial_layer_jerk.value;
|
||||||
}
|
}
|
||||||
} else {
|
} else { // ORCA: Handle short-travel acceleration and jerk for outer perimeters (if applicable)
|
||||||
|
const bool is_short_travel = travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel));
|
||||||
|
|
||||||
if (m_config.default_acceleration.value > 0) {
|
if (m_config.default_acceleration.value > 0) {
|
||||||
if (role == erExternalPerimeter && travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel))) {
|
if (role == erOverhangPerimeter && is_short_travel) {
|
||||||
|
const double bridge_acceleration = m_config.get_abs_value("bridge_acceleration");
|
||||||
|
|
||||||
|
if (bridge_acceleration > 0)
|
||||||
|
acceleration_to_set = (unsigned int) floor(bridge_acceleration + 0.5);
|
||||||
|
} else if (role == erExternalPerimeter && is_short_travel) {
|
||||||
if (m_config.outer_wall_acceleration.value > 0)
|
if (m_config.outer_wall_acceleration.value > 0)
|
||||||
acceleration_to_set = (unsigned int) floor(m_config.outer_wall_acceleration.value + 0.5);
|
acceleration_to_set = (unsigned int) floor(m_config.outer_wall_acceleration.value + 0.5);
|
||||||
} else {
|
} else {
|
||||||
@@ -7103,7 +7110,7 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_config.default_jerk.value > 0) {
|
if (m_config.default_jerk.value > 0) {
|
||||||
if (role == erExternalPerimeter && travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel))) {
|
if ((role == erExternalPerimeter || role == erOverhangPerimeter) && is_short_travel) {
|
||||||
if (m_config.outer_wall_jerk.value > 0)
|
if (m_config.outer_wall_jerk.value > 0)
|
||||||
jerk_to_set = m_config.outer_wall_jerk.value;
|
jerk_to_set = m_config.outer_wall_jerk.value;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user