update libslic3r

This commit is contained in:
QIDI TECH
2025-05-05 19:52:57 +08:00
parent eae8e18c3a
commit 126534997a
180 changed files with 24833 additions and 5679 deletions

View File

@@ -38,18 +38,61 @@ enum MappingResult {
struct FilamentInfo
{
int id; // filament id = extruder id, start with 0.
int id{0}; // filament id = extruder id, start with 0.
std::string type;
std::string color;
std::string filament_id;
std::string brand;
float used_m;
float used_g;
int tray_id; // start with 0
float distance;
float used_m{0.f};
float used_g{0.f};
int tray_id{0}; // start with 0
float distance{0.f};
int ctype = 0;
std::vector<std::string> colors = std::vector<std::string>();
int mapping_result = 0;
/*for new ams mapping*/
std::string ams_id;
std::string slot_id;
public:
int get_ams_id() const
{
if (ams_id.empty()) { return -1; };
try
{
return stoi(ams_id);
}
catch (...) {};
return -1;
};
int get_slot_id() const
{
if (slot_id.empty()) { return -1; };
try {
return stoi(slot_id);
} catch (...) {};
return -1;
};
/*copied from AmsTray::get_display_filament_type()*/
std::string get_display_filament_type()
{
if (type == "PLA-S")
return "Sup.PLA";
else if (type == "PA-S")
return "Sup.PA";
else if (type == "ABS-S")
return "Sup.ABS";
else
return type;
return type;
}
};
class QDTSliceInfo {