mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-07 12:21:50 +03:00
update libslic3r
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user