ENH: add filament group strategy

1.When capacity is greater than the num of filaments, always choose the
map result that can be accommodated
2.In BestFit strategy,always try to fill up the existing capacity
3.In BestCost strategy, just try the group with fewest flush

jira:NEW

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ifd6d64b77774039e57ffff26cf2243a4d3f89054
(cherry picked from commit cddf8cae27f4320f830b463e92703d3a6cf344e7)
This commit is contained in:
xun.zhang authored and Noisyfox committed 2025-08-24 23:18:06 +08:00
1 parent 7aa1980813
commit 5a6b215ef0
3 files changed
+82 -48

No files matched your search

+1 -1
View File
@@ -1037,7 +1037,7 @@ std::vector<int> ToolOrdering::get_recommended_filament_maps(const std::vector<s
{ 16,16 }
);
fg.get_custom_seq = get_custom_seq;
fg.calc_filament_group(layer_filaments);
fg.calc_filament_group(layer_filaments,FGStrategy::BestFit);
auto filament_map = fg.get_filament_map();
for (size_t idx = 0; idx < filament_map.size(); ++idx) {