mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
ENH: support auto pa cali for multi_extruder printer
jira: none Change-Id: I835a0e20de81f9af7c40983e00bdb37ea6c95a68 (cherry picked from commit 4e387d4ace4332a7c2b6c0ab695b80a51597d0c7)
This commit is contained in:
@@ -1132,6 +1132,15 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
|||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int extruder_id = obj->get_extruder_id_by_ams_id(std::to_string(ams_id));
|
||||||
|
NozzleVolumeType nozzle_volume_type = NozzleVolumeType::nvtNormal;
|
||||||
|
if (obj->m_extder_data.extders[extruder_id].current_nozzle_flow_type == NozzleFlowType::NONE_FLOWTYPE) {
|
||||||
|
MessageDialog dlg(nullptr, _L("There are unset nozzle types. Please set the nozzle types of all extruders before synchronizing."), _L("Warning"), wxICON_WARNING | wxOK);
|
||||||
|
dlg.ShowModal();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
nozzle_volume_type = NozzleVolumeType(obj->m_extder_data.extders[extruder_id].current_nozzle_flow_type - 1);
|
||||||
|
}
|
||||||
if (obj->cali_version >= 0) {
|
if (obj->cali_version >= 0) {
|
||||||
// add default item
|
// add default item
|
||||||
PACalibResult default_item;
|
PACalibResult default_item;
|
||||||
@@ -1144,6 +1153,9 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
|||||||
std::vector<PACalibResult> cali_history = this->obj->pa_calib_tab;
|
std::vector<PACalibResult> cali_history = this->obj->pa_calib_tab;
|
||||||
for (auto cali_item : cali_history) {
|
for (auto cali_item : cali_history) {
|
||||||
if (cali_item.filament_id == ams_filament_id) {
|
if (cali_item.filament_id == ams_filament_id) {
|
||||||
|
if (obj->is_multi_extruders() && (cali_item.extruder_id != extruder_id || cali_item.nozzle_volume_type != nozzle_volume_type)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
items.push_back(from_u8(cali_item.name));
|
items.push_back(from_u8(cali_item.name));
|
||||||
m_pa_profile_items.push_back(cali_item);
|
m_pa_profile_items.push_back(cali_item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -849,7 +849,7 @@ void NewCalibrationHistoryDialog::on_ok(wxCommandEvent &event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_new_result.extruder_id = get_extruder_id(m_comboBox_extruder->GetSelection());
|
m_new_result.extruder_id = get_extruder_id(m_comboBox_extruder->GetSelection());
|
||||||
m_new_result.nozzle_volume_type = NozzleVolumeType(m_comboBox_extruder->GetSelection());
|
m_new_result.nozzle_volume_type = NozzleVolumeType(m_comboBox_nozzle_type->GetSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto filament_item = map_filament_items[m_comboBox_filament->GetValue().ToStdString()];
|
auto filament_item = map_filament_items[m_comboBox_filament->GetValue().ToStdString()];
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern void get_default_k_n_value(const std::string &filament_id, float &k, float &n);
|
extern void get_default_k_n_value(const std::string &filament_id, float &k, float &n);
|
||||||
|
|
||||||
extern wxString get_nozzle_volume_type_name(NozzleVolumeType type);
|
extern wxString get_nozzle_volume_type_name(NozzleVolumeType type);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user