ENH: refine filament group algorithm

1.Use max flow network to handle limit
2.Support setting master extruder id
3.Fix the issue in the KMedoids algorithm where data is overwritten
after each retry.

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Idd2bedf39f61e7a65eb4199852f60b8fbebe0a7d
(cherry picked from commit 3cfb49a1b9dc2c76066ec441f1028f99a4bf99c4)
This commit is contained in:
xun.zhang
2024-09-30 16:30:34 +08:00
committed by Noisyfox
parent 3e9e9a1fa0
commit e1ebe832dd
9 changed files with 345 additions and 73 deletions

View File

@@ -4506,6 +4506,11 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionStrings { "Direct Drive Normal" });
def->cli = ConfigOptionDef::nocli;
def = this->add("master_extruder_id", coInt);
def->label = "Master extruder id";
def->tooltip = "Default extruder id to place filament";
def->set_default_value(new ConfigOptionInt{ 1 });
def = this->add("print_extruder_id", coInts);
def->label = "Print extruder id";
def->tooltip = "Print extruder id";