ENH: filament map params switch to global param

1.Add more filament map modes
2.Filament map and mode are set as project config
3.Plate filament map is only valid when plate filament mode is
manual

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I33b2f853e0b77b9d605be1f2f1172b44df43da15
(cherry picked from commit e45f8c6dc2146e1e31a1c21e8aaada540af112d0)
This commit is contained in:
xun.zhang
2024-12-19 14:53:42 +08:00
committed by Noisyfox
parent a7956a841d
commit f5a8c96924
20 changed files with 218 additions and 115 deletions

View File

@@ -2133,7 +2133,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
std::vector<int>filament_maps = this->get_filament_maps();
auto map_mode = get_filament_map_mode();
// get recommended filament map
if (map_mode == FilamentMapMode::fmmAuto) {
if (map_mode < FilamentMapMode::fmmManual) {
filament_maps = ToolOrdering::get_recommended_filament_maps(all_filaments, &config(), this, physical_unprintables, geometric_unprintables);
std::transform(filament_maps.begin(), filament_maps.end(), filament_maps.begin(), [](int value) { return value + 1; });
update_filament_maps_to_config(filament_maps);