From 9d87257aec75d6700d1c8990f0f92a37fdc9fd1b Mon Sep 17 00:00:00 2001 From: PavelMikus Date: Fri, 2 Dec 2022 13:30:18 +0100 Subject: [PATCH] lower the speed, improve params --- src/libslic3r/GCode.cpp | 4 ++-- src/libslic3r/GCode/ExtrusionProcessor.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index ffdf24b1a..4a46269ab 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3007,7 +3007,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de comment = description; comment += description_bridge; } - double last_set_speed = std::max(10.0, new_points[0].speed_factor * speed) * 60.0; + double last_set_speed = std::max(5.0, new_points[0].speed_factor * speed) * 60.0; gcode += m_writer.set_speed(last_set_speed, "", comment); Vec2d prev = this->point_to_gcode_quantized(new_points[0].p); for (size_t i = 1; i < new_points.size(); i++) { @@ -3016,7 +3016,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de const double line_length = (p - prev).norm(); gcode += m_writer.extrude_to_xy(p, e_per_mm * line_length, comment); prev = p; - double new_speed = std::max(10.0, procesed_point.speed_factor * speed) * 60.0; + double new_speed = std::max(5.0, procesed_point.speed_factor * speed) * 60.0; if (last_set_speed != new_speed) { gcode += m_writer.set_speed(new_speed, "", comment); last_set_speed = new_speed; diff --git a/src/libslic3r/GCode/ExtrusionProcessor.hpp b/src/libslic3r/GCode/ExtrusionProcessor.hpp index 7b5f90bd6..076de5468 100644 --- a/src/libslic3r/GCode/ExtrusionProcessor.hpp +++ b/src/libslic3r/GCode/ExtrusionProcessor.hpp @@ -126,8 +126,8 @@ public: }; float flow_width = path.width; - float min_malformation_dist = 0.2 * flow_width; - float peak_malformation_dist = 0.75 * flow_width; + float min_malformation_dist = 0.1 * flow_width; + float peak_malformation_dist = 0.65 * flow_width; const Points &original_points = path.polyline.points; std::vector points; @@ -199,7 +199,7 @@ public: if (curvature > 1.0f) { curvature_penalty = 1.0f; } else if (curvature > 0.1f) { - curvature_penalty = fmin(1.0, distance - min_malformation_dist) * curvature; + curvature_penalty = fmin(1.0, (distance - min_malformation_dist) / flow_width) * curvature; } a.quality -= curvature_penalty;