ENH: Add a button to control whether to enable volumetric-speed fitting

Jira: None
Change-Id: I8d9fd3468dbfb8904d164b289f9d5223e476145c
(cherry picked from commit 3acf97f1b3cf12d34a3679eef550cc26e03eb86c)
This commit is contained in:
weizhen.xie
2025-08-19 20:04:46 +08:00
committed by Noisyfox
parent d9d2814b24
commit 7bc01c625d
6 changed files with 25 additions and 4 deletions

View File

@@ -5981,8 +5981,12 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
}
}
//BBS: if not set the speed, then use the filament_max_volumetric_speed directly
double filament_max_volumetric_speed = calc_max_volumetric_speed(path.height, path.width, FILAMENT_CONFIG(volumetric_speed_coefficients));
filament_max_volumetric_speed = std::min(filament_max_volumetric_speed, FILAMENT_CONFIG(filament_max_volumetric_speed));
double filament_max_volumetric_speed = FILAMENT_CONFIG(filament_max_volumetric_speed);
if (FILAMENT_CONFIG(filament_adaptive_volumetric_speed)){
double fitted_value = calc_max_volumetric_speed(path.height, path.width, FILAMENT_CONFIG(volumetric_speed_coefficients));
filament_max_volumetric_speed = std::min(filament_max_volumetric_speed, fitted_value);
}
if (speed == 0)
speed = filament_max_volumetric_speed / _mm3_per_mm;
if (this->on_first_layer()) {