diff --git a/src/libslic3r/GCode/ExtrusionProcessor.cpp b/src/libslic3r/GCode/ExtrusionProcessor.cpp index 00e4f8075c..8ebc5d3df1 100644 --- a/src/libslic3r/GCode/ExtrusionProcessor.cpp +++ b/src/libslic3r/GCode/ExtrusionProcessor.cpp @@ -203,6 +203,13 @@ std::pair calculate_overhang_speed(const ExtrusionAttributes &attri float fan_speed = std::min(interpolate_speed(fan_speed_sections, attributes.overhang_attributes->start_distance_from_prev_layer), interpolate_speed(fan_speed_sections, attributes.overhang_attributes->end_distance_from_prev_layer)); + if (!config.enable_dynamic_overhang_speeds) { + final_speed = -1; + } + if (!config.enable_dynamic_fan_speeds.get_at(extruder_id)) { + fan_speed = -1; + } + return {final_speed, fan_speed}; } diff --git a/src/libslic3r/GCode/ExtrusionProcessor.hpp b/src/libslic3r/GCode/ExtrusionProcessor.hpp index dacb2d0f73..c636b25c3b 100644 --- a/src/libslic3r/GCode/ExtrusionProcessor.hpp +++ b/src/libslic3r/GCode/ExtrusionProcessor.hpp @@ -92,12 +92,12 @@ std::vector estimate_points_properties(const POINTS const ExtendedPoint &curr = points[point_idx]; const ExtendedPoint &next = points[point_idx + 1]; - if ((curr.distance > 0 && curr.distance < boundary_offset + 2.0f) || - (next.distance > 0 && next.distance < boundary_offset + 2.0f)) { + if ((curr.distance > -boundary_offset && curr.distance < boundary_offset + 2.0f) || + (next.distance > -boundary_offset && next.distance < boundary_offset + 2.0f)) { double line_len = (next.position - curr.position).norm(); if (line_len > 4.0f) { - double a0 = std::clamp((curr.distance + 2 * boundary_offset) / line_len, 0.0, 1.0); - double a1 = std::clamp(1.0f - (next.distance + 2 * boundary_offset) / line_len, 0.0, 1.0); + double a0 = std::clamp((curr.distance + 3 * boundary_offset) / line_len, 0.0, 1.0); + double a1 = std::clamp(1.0f - (next.distance + 3 * boundary_offset) / line_len, 0.0, 1.0); double t0 = std::min(a0, a1); double t1 = std::max(a0, a1); diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 5e3220cab4..49d7afaae2 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -582,7 +582,7 @@ void PrintObject::calculate_overhanging_perimeters() layer_region->m_perimeters = ExtrusionProcessor::calculate_and_split_overhanging_extrusions(&layer_region->m_perimeters, unscaled_polygons_lines[prev_layer_id], - curled_lines[prev_layer_id]); + curled_lines[l->id()]); } } });