mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-12 11:37:42 +00:00
Warn when a filament will switch extruders mid-print
This commit is contained in:
@@ -111,6 +111,7 @@ enum PrintDialogStatus : unsigned int {
|
|||||||
PrintStatusFilamentWarningUnknownHighChamberTempSoft,
|
PrintStatusFilamentWarningUnknownHighChamberTempSoft,
|
||||||
PrintStatusWarningExtFilamentNotMatch,
|
PrintStatusWarningExtFilamentNotMatch,
|
||||||
PrintStatusFilamentWarningNozzleHRC,
|
PrintStatusFilamentWarningNozzleHRC,
|
||||||
|
PrintStatusFilamentCrossExtruderWarning,
|
||||||
PrintStatusFilamentWarningEnd,
|
PrintStatusFilamentWarningEnd,
|
||||||
|
|
||||||
PrintStatusWarningEnd,//->end error<-
|
PrintStatusWarningEnd,//->end error<-
|
||||||
|
|||||||
@@ -1875,6 +1875,22 @@ bool SelectMachineDialog::check_sdcard_for_timelpase(MachineObject* obj)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SelectMachineDialog::CheckWarningFilamentCrossExtruder(MachineObject* obj_)
|
||||||
|
{
|
||||||
|
if (!obj_ || m_print_type != PrintFromType::FROM_NORMAL) return true;
|
||||||
|
if (obj_->GetExtderSystem()->GetTotalExtderCount() != 2) return true;
|
||||||
|
|
||||||
|
for (const auto& fila : m_ams_mapping_result) {
|
||||||
|
std::set<int> used_extruder_ids;
|
||||||
|
for (const auto& [pos_id, nozzle] : get_mapped_nozzles(fila.id)) {
|
||||||
|
if (!nozzle.IsEmpty()) { used_extruder_ids.insert(nozzle.GetExtruderId()); }
|
||||||
|
}
|
||||||
|
if (used_extruder_ids.size() >= 2) { return false; }
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxString> params, wxString wiki_url)
|
void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxString> params, wxString wiki_url)
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
@@ -2115,6 +2131,10 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||||||
// Advisory rack inventory shortfalls: allow Send.
|
// Advisory rack inventory shortfalls: allow Send.
|
||||||
Enable_Refresh_Button(true);
|
Enable_Refresh_Button(true);
|
||||||
Enable_Send_Button(true);
|
Enable_Send_Button(true);
|
||||||
|
} else if (status == PrintDialogStatus::PrintStatusFilamentCrossExtruderWarning) {
|
||||||
|
// Advisory only: per-nozzle K can't follow a filament across extruders.
|
||||||
|
Enable_Refresh_Button(true);
|
||||||
|
Enable_Send_Button(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*enter perpare mode*/
|
/*enter perpare mode*/
|
||||||
@@ -4247,6 +4267,11 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
|
|||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!CheckWarningFilamentCrossExtruder(obj_)) {
|
||||||
|
wxString warning_msg = _L("Some filaments may switch between extruders during printing. Manual K-value calibration cannot be applied throughout the entire print, which "
|
||||||
|
"may affect print quality. Enabling Flow Dynamics Calibration is recommended.");
|
||||||
|
show_status(PrintDialogStatus::PrintStatusFilamentCrossExtruderWarning, { warning_msg });
|
||||||
|
}
|
||||||
if (m_ams_mapping_res) {
|
if (m_ams_mapping_res) {
|
||||||
if (has_timelapse_warning()) {
|
if (has_timelapse_warning()) {
|
||||||
show_status(PrintDialogStatus::PrintStatusTimelapseWarning);
|
show_status(PrintDialogStatus::PrintStatusTimelapseWarning);
|
||||||
|
|||||||
@@ -531,6 +531,9 @@ public:
|
|||||||
// Compare the slicing file's nozzle requirements (validity, flow, diameter) against the
|
// Compare the slicing file's nozzle requirements (validity, flow, diameter) against the
|
||||||
// printer; the rack extruder is checked against its whole inventory (mounted + rack).
|
// printer; the rack extruder is checked against its whole inventory (mounted + rack).
|
||||||
bool CheckErrorExtruderNozzleWithSlicing(MachineObject* obj_);//return true if no errors
|
bool CheckErrorExtruderNozzleWithSlicing(MachineObject* obj_);//return true if no errors
|
||||||
|
// Warn (without blocking) when a mapped filament would be printed from both extruders on a
|
||||||
|
// dual-extruder printer, so per-nozzle manual K-value can't follow it across the whole print.
|
||||||
|
bool CheckWarningFilamentCrossExtruder(MachineObject* obj_);
|
||||||
|
|
||||||
// Rack print-dispatch nozzle mapping (H2C): request the printer's auto-mapping and consume the
|
// Rack print-dispatch nozzle mapping (H2C): request the printer's auto-mapping and consume the
|
||||||
// result, gating the Send button while the printer computes. Both are no-ops for non-rack printers.
|
// result, gating the Send button while the printer computes. Both are no-ops for non-rack printers.
|
||||||
|
|||||||
Reference in New Issue
Block a user