mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
ENH:add "is_filament_installed" in MachineObject
jira: none Change-Id: Ifd71947a742c1ed37fa22bbf0bb2cd538ff47268 (cherry picked from commit 21d1159cd54259fb53c005bbc1cb66b6b3b40c97)
This commit is contained in:
@@ -1648,6 +1648,25 @@ int MachineObject::get_bed_temperature_limit()
|
|||||||
return BED_TEMP_LIMIT;
|
return BED_TEMP_LIMIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MachineObject::is_filament_installed()
|
||||||
|
{
|
||||||
|
if (m_extder_data.extders.size() > 0) {
|
||||||
|
// right//or single
|
||||||
|
auto ext = m_extder_data.extders[MAIN_NOZZLE_ID];
|
||||||
|
if (ext.ext_has_filament) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*left*/
|
||||||
|
if (m_extder_data.extders.size() > 1) {
|
||||||
|
auto ext = m_extder_data.extders[DEPUTY_NOZZLE_ID];
|
||||||
|
if (ext.ext_has_filament) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool MachineObject::is_makeworld_subtask()
|
bool MachineObject::is_makeworld_subtask()
|
||||||
{
|
{
|
||||||
if (model_task && model_task->design_id > 0) {
|
if (model_task && model_task->design_id > 0) {
|
||||||
|
|||||||
@@ -904,7 +904,7 @@ public:
|
|||||||
int printing_speed_mag = 100;
|
int printing_speed_mag = 100;
|
||||||
PrintingSpeedLevel _parse_printing_speed_lvl(int lvl);
|
PrintingSpeedLevel _parse_printing_speed_lvl(int lvl);
|
||||||
int get_bed_temperature_limit();
|
int get_bed_temperature_limit();
|
||||||
|
bool is_filament_installed();
|
||||||
/* camera */
|
/* camera */
|
||||||
bool has_ipcam { false };
|
bool has_ipcam { false };
|
||||||
bool camera_recording { false };
|
bool camera_recording { false };
|
||||||
|
|||||||
@@ -2784,6 +2784,10 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||||||
p->plater->pop_warning_and_go_to_device_page(printer_name, Plater::PrinterWarningType::NOT_CONNECTED, _L("Sync printer information"));
|
p->plater->pop_warning_and_go_to_device_page(printer_name, Plater::PrinterWarningType::NOT_CONNECTED, _L("Sync printer information"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!obj->is_filament_installed()) {
|
||||||
|
p->plater->pop_warning_and_go_to_device_page("", Plater::PrinterWarningType::UNINSTALL_FILAMENT, _L("Sync printer information"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
bool exist_at_list_one_filament =false;
|
bool exist_at_list_one_filament =false;
|
||||||
for (auto &cur : list) {
|
for (auto &cur : list) {
|
||||||
auto temp_config = cur.second;
|
auto temp_config = cur.second;
|
||||||
|
|||||||
Reference in New Issue
Block a user