FIX: some filament group issues

1. Add filament_is_support field. Format the filament type
2. Optimize machine filament info logic

jira:STUDIO-10326

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ia8bfc37095339e73c98209b4e3f1e0804e511e88
(cherry picked from commit 001144400b841629439a890d46fa40a7296689ba)
This commit is contained in:
xun.zhang
2025-02-12 18:28:28 +08:00
committed by Noisyfox
parent 2db3c63b7b
commit 58c877976d
8 changed files with 142 additions and 70 deletions

View File

@@ -55,6 +55,20 @@ struct MergeFilamentInfo {
std::vector<std::vector<int>> merges;
bool is_empty() { return merges.empty();}
};
struct FilamentBaseInfo
{
std::string filament_name;
std::string filament_id;
std::string filament_type;
std::string vendor;
int nozzle_temp_range_low;
int nozzle_temp_range_high;
bool is_support;
bool is_system;
};
// Bundle of Print + Filament + Printer presets.
class PresetBundle
{
@@ -112,9 +126,12 @@ public:
Preset* get_preset_differed_for_save(Preset& preset);
int get_differed_values_to_update(Preset& preset, std::map<std::string, std::string>& key_values);
//BBS: get vendor's current version
Semver get_vendor_profile_version(std::string vendor_name);
std::optional<FilamentBaseInfo> get_filament_by_filament_id(const std::string& filament_id) const;
// Orca: get vendor type
VendorType get_current_vendor_type();
// Vendor related handy functions