From 2eace660e87f6faf27257d2ff23c809eb6540ecd Mon Sep 17 00:00:00 2001 From: "qing.zhang" Date: Tue, 11 Feb 2025 12:13:24 +0800 Subject: [PATCH] ENH: add limit for smooth_coefficient Jira: 10274 Signed-off-by: qing.zhang Change-Id: I9e288de79b38af6baf93263ccbb452c8996430ba --- src/libslic3r/GCode.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index c9cea8f83..b827b25d2 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -4622,7 +4622,7 @@ ExtrusionPaths GCode::set_speed_transition(ExtrusionPaths &paths) void GCode::smooth_speed_discontinuity_area(ExtrusionPaths &paths) { - if (paths.size() <= 1) + if (paths.size() <= 1 || this->config().smooth_coefficient == 0) return; //step 1 merge same speed path diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 7025d021b..69be58c8d 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2691,8 +2691,9 @@ void PrintConfigDef::init_fff_params() def = this->add("smooth_coefficient", coFloat); def->label = L("Smooth coefficient"); def->category = L("Quality"); - def->tooltip = L("The smaller the number, the longer the speed transition path."); + def->tooltip = L("The smaller the number, the longer the speed transition path. 0 means not apply."); def->mode = comAdvanced; + def->min = 0; def->set_default_value(new ConfigOptionFloat(80)); def = this->add("wall_filament", coInt);