FIX: 支撑设置PVA为主体时,应弹窗提示,将界面也同步为PVA

jira: STUDIO-12270
Change-Id: I01a399ff9a3e0451e9c931a1465e44658a823ae3
This commit is contained in:
jiaxi.chen 2025-05-23 15:41:19 +08:00 committed by lane.wei
parent db91857bda
commit d382857cbc

View File

@ -1567,6 +1567,29 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
} }
wxGetApp().plater()->update(); wxGetApp().plater()->update();
} }
if (is_soluble_filament(filament_id) &&
!(m_config->opt_float("support_top_z_distance") == 0 && m_config->opt_float("support_interface_spacing") == 0 &&
m_config->opt_enum<SupportMaterialInterfacePattern>("support_interface_pattern") == SupportMaterialInterfacePattern::smipRectilinearInterlaced &&
filament_id == interface_filament_id)) {
wxString msg_text = _L("When using soluble material for the support, We recommend the following settings:\n"
"0 top z distance, 0 interface spacing, interlaced rectilinear pattern, disable independent support layer height \n"
"and use soluble materials for both support interface and support base");
msg_text += "\n\n" + _L("Change these settings automatically? \n"
"Yes - Change these settings automatically\n"
"No - Do not change these settings for me");
MessageDialog dialog(wxGetApp().plater(), msg_text, "Suggestion", wxICON_WARNING | wxYES | wxNO);
DynamicPrintConfig new_conf = *m_config;
if (dialog.ShowModal() == wxID_YES) {
new_conf.set_key_value("support_top_z_distance", new ConfigOptionFloat(0));
new_conf.set_key_value("support_interface_spacing", new ConfigOptionFloat(0));
new_conf.set_key_value("support_interface_pattern",
new ConfigOptionEnum<SupportMaterialInterfacePattern>(SupportMaterialInterfacePattern::smipRectilinearInterlaced));
new_conf.set_key_value("independent_support_layer_height", new ConfigOptionBool(false));
new_conf.set_key_value("support_interface_filament", new ConfigOptionInt(filament_id + 1));
m_config_manipulation.apply(m_config, &new_conf);
}
wxGetApp().plater()->update();
}
} }
// BBS popup a message to ask the user to set optimum parameters for support interface if support materials are used // BBS popup a message to ask the user to set optimum parameters for support interface if support materials are used