mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-22 04:35:17 +00:00
ENH: support mix mapping
jira: [STUDIO-13673] Change-Id: Ic1c89457f5154c108dbab41850ed49561aa34fde (cherry picked from commit 12942e0545424e2528cc3f3c9aa6947b76469b3d)
This commit is contained in:
@@ -46,7 +46,8 @@
|
|||||||
"support_chamber": true,
|
"support_chamber": true,
|
||||||
"support_chamber_temp_edit": false,
|
"support_chamber_temp_edit": false,
|
||||||
"support_extrusion_cali": false,
|
"support_extrusion_cali": false,
|
||||||
"support_user_preset": false
|
"support_user_preset": false,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "BL-P001",
|
"model_id": "BL-P001",
|
||||||
"compatible_machine": [ "BL-P002", "C11", "C12", "C13" ],
|
"compatible_machine": [ "BL-P002", "C11", "C12", "C13" ],
|
||||||
|
|||||||
@@ -46,7 +46,8 @@
|
|||||||
"support_chamber": true,
|
"support_chamber": true,
|
||||||
"support_chamber_temp_edit": false,
|
"support_chamber_temp_edit": false,
|
||||||
"support_extrusion_cali": false,
|
"support_extrusion_cali": false,
|
||||||
"support_user_preset": false
|
"support_user_preset": false,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "BL-P002",
|
"model_id": "BL-P002",
|
||||||
"auto_pa_cali_thumbnail_image": "fd_calibration_auto",
|
"auto_pa_cali_thumbnail_image": "fd_calibration_auto",
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"support_chamber_temp_edit": false,
|
"support_chamber_temp_edit": false,
|
||||||
"support_extrusion_cali": true,
|
"support_extrusion_cali": true,
|
||||||
"support_user_preset": false,
|
"support_user_preset": false,
|
||||||
"bed_temperature_limit": 100
|
"bed_temperature_limit": 100,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "C11",
|
"model_id": "C11",
|
||||||
"support_wrapping_detection": false,
|
"support_wrapping_detection": false,
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"support_chamber_temp_edit": false,
|
"support_chamber_temp_edit": false,
|
||||||
"support_extrusion_cali": true,
|
"support_extrusion_cali": true,
|
||||||
"support_user_preset": false,
|
"support_user_preset": false,
|
||||||
"bed_temperature_limit": 100
|
"bed_temperature_limit": 100,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "C12",
|
"model_id": "C12",
|
||||||
"support_wrapping_detection": false,
|
"support_wrapping_detection": false,
|
||||||
|
|||||||
@@ -50,7 +50,8 @@
|
|||||||
"support_extrusion_cali": false,
|
"support_extrusion_cali": false,
|
||||||
"support_user_preset": false,
|
"support_user_preset": false,
|
||||||
"bed_temperature_limit": 110,
|
"bed_temperature_limit": 110,
|
||||||
"nozzle_max_temperature": 320
|
"nozzle_max_temperature": 320,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "C13",
|
"model_id": "C13",
|
||||||
"support_wrapping_detection": false,
|
"support_wrapping_detection": false,
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"support_chamber_temp_edit": false,
|
"support_chamber_temp_edit": false,
|
||||||
"support_extrusion_cali": true,
|
"support_extrusion_cali": true,
|
||||||
"support_user_preset": false,
|
"support_user_preset": false,
|
||||||
"bed_temperature_limit": 80
|
"bed_temperature_limit": 80,
|
||||||
|
"support_ams_ext_mix_print": false
|
||||||
},
|
},
|
||||||
"model_id": "N1",
|
"model_id": "N1",
|
||||||
"support_wrapping_detection": false,
|
"support_wrapping_detection": false,
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"support_chamber_temp_edit": false,
|
"support_chamber_temp_edit": false,
|
||||||
"support_extrusion_cali": true,
|
"support_extrusion_cali": true,
|
||||||
"support_user_preset": false,
|
"support_user_preset": false,
|
||||||
"bed_temperature_limit": 100
|
"bed_temperature_limit": 100,
|
||||||
|
"support_ams_ext_mix_print": false
|
||||||
},
|
},
|
||||||
"model_id": "N2S",
|
"model_id": "N2S",
|
||||||
"compatible_machine": [],
|
"compatible_machine": [],
|
||||||
|
|||||||
@@ -60,7 +60,8 @@
|
|||||||
"support_chamber_temp_switch_heating": 40,
|
"support_chamber_temp_switch_heating": 40,
|
||||||
"support_extrusion_cali": false,
|
"support_extrusion_cali": false,
|
||||||
"support_user_preset": false,
|
"support_user_preset": false,
|
||||||
"support_refresh_nozzle": true
|
"support_refresh_nozzle": true,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "O1D",
|
"model_id": "O1D",
|
||||||
"support_wrapping_detection": true,
|
"support_wrapping_detection": true,
|
||||||
|
|||||||
@@ -59,7 +59,8 @@
|
|||||||
"support_chamber_temp_edit_range": [ 0, 65 ],
|
"support_chamber_temp_edit_range": [ 0, 65 ],
|
||||||
"support_chamber_temp_switch_heating": 40,
|
"support_chamber_temp_switch_heating": 40,
|
||||||
"support_extrusion_cali": false,
|
"support_extrusion_cali": false,
|
||||||
"support_user_preset": false
|
"support_user_preset": false,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "O1E",
|
"model_id": "O1E",
|
||||||
"support_wrapping_detection": true,
|
"support_wrapping_detection": true,
|
||||||
|
|||||||
@@ -58,7 +58,8 @@
|
|||||||
"support_chamber_temp_edit_range": [0, 65],
|
"support_chamber_temp_edit_range": [0, 65],
|
||||||
"support_chamber_temp_switch_heating": 40,
|
"support_chamber_temp_switch_heating": 40,
|
||||||
"support_extrusion_cali": false,
|
"support_extrusion_cali": false,
|
||||||
"support_user_preset": false
|
"support_user_preset": false,
|
||||||
|
"support_ams_ext_mix_print": true
|
||||||
},
|
},
|
||||||
"model_id": "O1S",
|
"model_id": "O1S",
|
||||||
"auto_pa_cali_thumbnail_image": "fd_calibration_auto_single_o",
|
"auto_pa_cali_thumbnail_image": "fd_calibration_auto_single_o",
|
||||||
|
|||||||
@@ -225,7 +225,6 @@ public:
|
|||||||
std::vector<MappingItem*> m_mapping_item_list;
|
std::vector<MappingItem*> m_mapping_item_list;
|
||||||
|
|
||||||
bool m_has_unmatch_filament {false};
|
bool m_has_unmatch_filament {false};
|
||||||
bool m_supporting_mix_print {false}; //For single extruder, can ams and ext print together?
|
|
||||||
int m_current_filament_id;
|
int m_current_filament_id;
|
||||||
ShowType m_show_type{ShowType::RIGHT};
|
ShowType m_show_type{ShowType::RIGHT};
|
||||||
std::string m_tag_material;
|
std::string m_tag_material;
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ public:
|
|||||||
/*extruder*/
|
/*extruder*/
|
||||||
static bool get_printer_can_set_nozzle(std::string type_str) { return get_value_from_config<bool>(type_str, "enable_set_nozzle_info"); }// can set nozzle from studio
|
static bool get_printer_can_set_nozzle(std::string type_str) { return get_value_from_config<bool>(type_str, "enable_set_nozzle_info"); }// can set nozzle from studio
|
||||||
|
|
||||||
|
/*print job*/
|
||||||
|
static bool support_ams_ext_mix_print(std::string type_str) { return get_value_from_config<bool>(type_str, "print", "support_ams_ext_mix_print"); }
|
||||||
|
|
||||||
/*calibration*/
|
/*calibration*/
|
||||||
static std::vector<std::string> get_unsupport_auto_cali_filaments(std::string type_str) { return get_value_from_config<std::vector<std::string>>(type_str, "auto_cali_not_support_filaments"); }
|
static std::vector<std::string> get_unsupport_auto_cali_filaments(std::string type_str) { return get_value_from_config<std::vector<std::string>>(type_str, "auto_cali_not_support_filaments"); }
|
||||||
|
|
||||||
@@ -103,6 +106,25 @@ public:
|
|||||||
return T();
|
return T();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static T get_value_from_config(const std::string& type_str, const std::string& item1, const std::string& item2)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
const auto& json_item1 = get_value_from_config<nlohmann::json>(type_str, item1);
|
||||||
|
if (json_item1.contains(item2))
|
||||||
|
{
|
||||||
|
return json_item1[item2].get<T>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << " failed to get " << item1 << ", " << item2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return T();
|
||||||
|
}
|
||||||
|
|
||||||
static nlohmann::json get_json_from_config(const std::string& type_str, const std::string& key1, const std::string& key2 = std::string())
|
static nlohmann::json get_json_from_config(const std::string& type_str, const std::string& key1, const std::string& key2 = std::string())
|
||||||
{
|
{
|
||||||
std::string config_file = m_resource_file_path + "/printers/" + type_str + ".json";
|
std::string config_file = m_resource_file_path + "/printers/" + type_str + ".json";
|
||||||
|
|||||||
@@ -3405,12 +3405,12 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_mapping_popup.m_supporting_mix_print && nozzle_nums == 1) {
|
if (!DevPrinterConfigUtil::support_ams_ext_mix_print(obj_->printer_type)) {
|
||||||
bool useAms = _HasAms(m_ams_mapping_result);
|
bool useAms = _HasAms(m_ams_mapping_result);
|
||||||
bool useExt = _HasExt(m_ams_mapping_result);
|
bool useExt = _HasExt(m_ams_mapping_result);
|
||||||
if (useAms && useExt) {
|
if (useAms && useExt) {
|
||||||
show_status(PrintDialogStatus::PrintStatusAmsMappingMixInvalid);
|
show_status(PrintDialogStatus::PrintStatusAmsMappingMixInvalid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2392,19 +2392,6 @@ void SyncAmsInfoDialog::update_show_status()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_mapping_popup.m_supporting_mix_print && nozzle_nums == 1) {
|
|
||||||
bool useAms = false;
|
|
||||||
bool useExt = false;
|
|
||||||
for (auto iter = m_ams_mapping_result.begin(); iter != m_ams_mapping_result.end(); iter++) {
|
|
||||||
if (iter->tray_id != VIRTUAL_TRAY_MAIN_ID) { useAms = true; }
|
|
||||||
if (iter->tray_id == VIRTUAL_TRAY_MAIN_ID) { useExt = true; }
|
|
||||||
if (useAms && useExt) {
|
|
||||||
show_status(PrintDialogStatus::PrintStatusAmsMappingMixInvalid);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check ams and vt_slot mix use status
|
// check ams and vt_slot mix use status
|
||||||
{
|
{
|
||||||
struct ExtruderStatus
|
struct ExtruderStatus
|
||||||
|
|||||||
Reference in New Issue
Block a user