mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-09 13:32:42 +00:00
Feature/optimize warnings (#12821)
# Description tweak some wipe tower related warnings to reduce confusion 1. Skip flushing volume validation for multi-tool printers 2. check precise_z_height and enable_prime_tower conflicts in print validate # Screenshots/Recordings/Graphs <!-- > Please attach relevant screenshots to showcase the UI changes. > Please attach images that can help explain the changes. --> ## Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. -->
This commit is contained in:
@@ -1235,6 +1235,16 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_config.enable_prime_tower) {
|
if (m_config.enable_prime_tower) {
|
||||||
|
for (const PrintObject* object : m_objects) {
|
||||||
|
if (object->config().precise_z_height.value && warning != nullptr) {
|
||||||
|
StringObjectException warningtemp;
|
||||||
|
warningtemp.string = L("Enabling both precise Z height and the prime tower may cause slicing errors.");
|
||||||
|
warningtemp.opt_key = "precise_z_height";
|
||||||
|
warningtemp.is_warning = true;
|
||||||
|
*warning = warningtemp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_config.enable_wrapping_detection && warning!=nullptr) {
|
if (m_config.enable_wrapping_detection && warning!=nullptr) {
|
||||||
StringObjectException warningtemp;
|
StringObjectException warningtemp;
|
||||||
|
|||||||
@@ -9797,6 +9797,10 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
|||||||
|
|
||||||
bool GLCanvas3D::is_flushing_matrix_error() {
|
bool GLCanvas3D::is_flushing_matrix_error() {
|
||||||
|
|
||||||
|
// Flushing volumes only apply to single-extruder multi-material (SEMM) and BBL printers
|
||||||
|
if (!Sidebar::should_show_SEMM_buttons())
|
||||||
|
return false;
|
||||||
|
|
||||||
const auto &project_config = wxGetApp().preset_bundle->project_config;
|
const auto &project_config = wxGetApp().preset_bundle->project_config;
|
||||||
const std::vector<double> &config_matrix = (project_config.option<ConfigOptionFloats>("flush_volumes_matrix"))->values;
|
const std::vector<double> &config_matrix = (project_config.option<ConfigOptionFloats>("flush_volumes_matrix"))->values;
|
||||||
const std::vector<double> &config_multiplier = (project_config.option<ConfigOptionFloats>("flush_multiplier"))->values;
|
const std::vector<double> &config_multiplier = (project_config.option<ConfigOptionFloats>("flush_multiplier"))->values;
|
||||||
|
|||||||
@@ -1589,7 +1589,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
}
|
}
|
||||||
bool is_precise_z_height = m_config->option<ConfigOptionBool>("precise_z_height")->value;
|
bool is_precise_z_height = m_config->option<ConfigOptionBool>("precise_z_height")->value;
|
||||||
if (boost::any_cast<bool>(value) && is_precise_z_height) {
|
if (boost::any_cast<bool>(value) && is_precise_z_height) {
|
||||||
MessageDialog dlg(wxGetApp().plater(), _L("Enabling both precise Z height and the prime tower may cause the size of prime tower to increase. Do you still want to enable?"),
|
MessageDialog dlg(wxGetApp().plater(), _L("Enabling both precise Z height and the prime tower may cause slicing errors. Do you still want to enable?"),
|
||||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
||||||
if (dlg.ShowModal() == wxID_NO) {
|
if (dlg.ShowModal() == wxID_NO) {
|
||||||
DynamicPrintConfig new_conf = *m_config;
|
DynamicPrintConfig new_conf = *m_config;
|
||||||
@@ -1631,7 +1631,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
if (opt_key == "precise_z_height") {
|
if (opt_key == "precise_z_height") {
|
||||||
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
||||||
if (boost::any_cast<bool>(value) && wipe_tower_enabled) {
|
if (boost::any_cast<bool>(value) && wipe_tower_enabled) {
|
||||||
MessageDialog dlg(wxGetApp().plater(), _L("Enabling both precise Z height and the prime tower may cause the size of prime tower to increase. Do you still want to enable?"),
|
MessageDialog dlg(wxGetApp().plater(), _L("Enabling both precise Z height and the prime tower may cause slicing errors. Do you still want to enable precise Z height?"),
|
||||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
||||||
if (dlg.ShowModal() == wxID_NO) {
|
if (dlg.ShowModal() == wxID_NO) {
|
||||||
DynamicPrintConfig new_conf = *m_config;
|
DynamicPrintConfig new_conf = *m_config;
|
||||||
|
|||||||
Reference in New Issue
Block a user