FIX: wrong flush volume when select filament or sync filament

1.Correct the wrong logic for support filament check

jira:STUDIO-13719

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ia0d5dfa210a4335ea2a6a5f5a97ba69fd136c720
(cherry picked from commit 75c75f83679937b1fcd2ef120ac83cc9a67f125b)
This commit is contained in:
xun.zhang 2025-07-30 21:19:08 +08:00 committed by Noisyfox
parent 40f8583440
commit b8bbb04527
3 changed files with 5 additions and 5 deletions

View file

@ -7303,7 +7303,7 @@ bool has_filaments(const std::vector<string>& model_filaments) {
return false;
}
bool is_support_filament(int extruder_id)
bool is_support_filament(int extruder_id, bool strict_check)
{
auto &filament_presets = Slic3r::GUI::wxGetApp().preset_bundle->filament_presets;
auto &filaments = Slic3r::GUI::wxGetApp().preset_bundle->filaments;
@ -7317,7 +7317,7 @@ bool is_support_filament(int extruder_id)
Slic3r::ConfigOptionBools *support_option = dynamic_cast<Slic3r::ConfigOptionBools *>(filament->config.option("filament_is_support"));
if (filament_type == "PETG" || filament_type == "PLA") {
if(!strict_check &&(filament_type == "PETG" || filament_type == "PLA")) {
std::vector<string> model_filaments;
if (filament_type == "PETG")
model_filaments.emplace_back("PLA");

View file

@ -721,7 +721,7 @@ private:
DECLARE_APP(GUI_App)
wxDECLARE_EVENT(EVT_CONNECT_LAN_MODE_PRINT, wxCommandEvent);
bool is_support_filament(int extruder_id);
bool is_support_filament(int extruder_id, bool strict_check = true);
bool is_soluble_filament(int extruder_id);
// check if the filament for model is in the list
bool has_filaments(const std::vector<string>& model_filaments);

View file

@ -1688,7 +1688,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
if (opt_key == "support_filament") {
int filament_id = m_config->opt_int("support_filament") - 1; // the displayed id is based from 1, while internal id is based from 0
int interface_filament_id = m_config->opt_int("support_interface_filament") - 1;
if (is_support_filament(filament_id) && !is_soluble_filament(filament_id) && !has_filaments({"TPU", "TPU-AMS"})) {
if (is_support_filament(filament_id, false) && !is_soluble_filament(filament_id) && !has_filaments({"TPU", "TPU-AMS"})) {
wxString msg_text = _L("Non-soluble support materials are not recommended for support base. \n"
"Are you sure to use them for support base? \n");
MessageDialog dialog(wxGetApp().plater(), msg_text, "", wxICON_WARNING | wxYES | wxNO);
@ -1706,7 +1706,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
if (opt_key == "support_interface_filament") {
int filament_id = m_config->opt_int("support_filament") - 1;
int interface_filament_id = m_config->opt_int("support_interface_filament") - 1; // the displayed id is based from 1, while internal id is based from 0
if ((is_support_filament(interface_filament_id) &&
if ((is_support_filament(interface_filament_id, false) &&
!(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)) ||
(is_soluble_filament(interface_filament_id) && !is_soluble_filament(filament_id))) {