ENH: support recommended filament map when print by object

1. support recommended filament map when print by object
2. placeholder_parser support function filament_change
3. extruder_id of filament_map is start from 1

Change-Id: Ide8019cd4a165a25972f22706ff685c3005aa031
(cherry picked from commit b42d94e1d05236b8b7b2e65b4a24810eecf040cb)
This commit is contained in:
zhimin.zeng
2024-07-02 20:26:13 +08:00
committed by Noisyfox
parent 8db3e3cd54
commit e2c3926c76
7 changed files with 182 additions and 17 deletions

View File

@@ -187,6 +187,8 @@ public:
std::vector<LayerTools>& layer_tools() { return m_layer_tools; }
bool has_wipe_tower() const { return ! m_layer_tools.empty() && m_first_printing_extruder != (unsigned int)-1 && m_layer_tools.front().has_wipe_tower; }
static std::vector<int> get_recommended_filament_maps(const std::vector<std::vector<unsigned int>> all_layer_filaments, const PrintConfig *print_config);
private:
void initialize_layers(std::vector<coordf_t> &zs);
void collect_extruders(const PrintObject &object, const std::vector<std::pair<double, unsigned int>> &per_layer_extruder_switches);
@@ -196,7 +198,7 @@ private:
void fill_wipe_tower_partitions(const PrintConfig &config, coordf_t object_bottom_z, coordf_t max_layer_height);
void mark_skirt_layers(const PrintConfig &config, coordf_t max_layer_height);
void collect_extruder_statistics(bool prime_multi_material);
std::vector<int> ToolOrdering::get_recommended_filament_maps();
std::vector<int> get_recommended_filament_maps();
void reorder_extruders_for_minimum_flush_volume();
void reorder_extruders_for_minimum_flush_volume_multi_extruder(const std::vector<int> &filament_maps);