ENH: add some params for multi extruder

1. Nozzle Volume and Nozzle Type support multi extruder now

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ie171b5105bd3830db3a992cadd365b785008c47a
(cherry picked from commit 2ebd14667e43dc745556f5e7bcbb7c2ccad4a007)
This commit is contained in:
xun.zhang
2024-08-23 19:47:00 +08:00
committed by Noisyfox
parent 1f0625b6bf
commit df71cd8876
7 changed files with 123 additions and 73 deletions

View File

@@ -309,6 +309,7 @@ public:
std::vector<int> get_extruders(bool conside_custom_gcode = false) const;
std::vector<int> get_extruders_under_cli(bool conside_custom_gcode, DynamicPrintConfig& full_config) const;
std::vector<int> get_extruders_without_support(bool conside_custom_gcode = false) const;
// get used filaments, 1 based idx
std::vector<int> get_used_extruders();
/* instance related operations*/
@@ -490,6 +491,7 @@ public:
bool has_auto_filament_map_reslut();
void set_auto_filament_map_result(bool has_result);
// get filament map, 0 based filament ids, 1 based extruder ids
std::vector<int> get_filament_maps();
void set_filament_maps(const std::vector<int>& f_maps);

View File

@@ -496,8 +496,8 @@ std::vector<int> get_min_flush_volumes(const DynamicPrintConfig &full_config, si
//const auto& full_config = wxGetApp().preset_bundle->full_config();
//auto& printer_config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
const ConfigOption* nozzle_volume_opt = full_config.option("nozzle_volume");
int nozzle_volume_val = nozzle_volume_opt ? (int)nozzle_volume_opt->getFloat() : 0;
const ConfigOptionFloatsNullable* nozzle_volume_opt = full_config.option<ConfigOptionFloatsNullable>("nozzle_volume");
int nozzle_volume_val = nozzle_volume_opt ? (int)nozzle_volume_opt->get_at(nozzle_id) : 0;
const ConfigOptionInt* enable_long_retraction_when_cut_opt = full_config.option<ConfigOptionInt>("enable_long_retraction_when_cut");
int machine_enabled_level = 0;