mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: some tpu filaments are not support auto cali
jira: none Change-Id: I253e5c5936bc5fb90612f385e358b3015bdabf2e (cherry picked from commit f38d8f959fabd36e4971c9b58eac193eb30fcd8f)
This commit is contained in:
@@ -7419,6 +7419,27 @@ std::vector<std::string> DeviceManager::get_compatible_machine(std::string type_
|
||||
return compatible_machine;
|
||||
}
|
||||
|
||||
std::vector<std::string> DeviceManager::get_unsupport_auto_cali_filaments(std::string type_str)
|
||||
{
|
||||
std::vector<std::string> filaments;
|
||||
std::string config_file = Slic3r::resources_dir() + "/printers/" + type_str + ".json";
|
||||
boost::nowide::ifstream json_file(config_file.c_str());
|
||||
try {
|
||||
json jj;
|
||||
if (json_file.is_open()) {
|
||||
json_file >> jj;
|
||||
if (jj.contains("00.00.00.00")) {
|
||||
json const &printer = jj["00.00.00.00"];
|
||||
if (printer.contains("auto_cali_not_support_filaments")) {
|
||||
for (auto res : printer["auto_cali_not_support_filaments"])
|
||||
filaments.emplace_back(res.get<std::string>());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (...) {}
|
||||
return filaments;
|
||||
}
|
||||
|
||||
boost::bimaps::bimap<std::string, std::string> DeviceManager::get_all_model_id_with_name()
|
||||
{
|
||||
boost::bimaps::bimap<std::string, std::string> models;
|
||||
|
||||
Reference in New Issue
Block a user