ENH: change base pattern "None" to "Hollow"

1. change base pattern "None" to "Hollow", and add an icon image
2. fix a bug of not initializing m_highest_overhang_layer
3. fix a bug where normal(auto) with Tree* styles won't generate any
   supports.
4. add popup message when selecting support material for interface.
5. draw connected loops when wall count is larger than 1

Change-Id: I7ea211d2971b25c65724bb10d0f6cf6e0b68c6a1
(cherry picked from commit 4c1ae7f937239fc3e1397ec2cb3b290d886bb0f0)
This commit is contained in:
Arthur 2022-12-21 19:05:14 +08:00 committed by Lane.Wei
parent 2690b5b558
commit 854eb0af95
10 changed files with 138 additions and 85 deletions

View file

@ -1418,7 +1418,6 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
// BBS popup a message to ask the user to set optimum parameters for tree support
if (opt_key == "support_type" || opt_key == "support_style") {
// BBS
if (is_tree_slim(m_config->opt_enum<SupportType>("support_type"), m_config->opt_enum<SupportMaterialStyle>("support_style")) &&
!(m_config->opt_float("support_top_z_distance") == 0 && m_config->opt_int("support_interface_top_layers") == 0 && m_config->opt_int("tree_support_wall_count") == 2)) {
wxString msg_text = _L("We have added an experimental style \"Tree Slim\" that features smaller support volume but weaker strength.\n"
@ -1438,6 +1437,28 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
}
}
// BBS popup a message to ask the user to set optimum parameters for support interface if support materials are used
if (opt_key == "support_interface_filament") {
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) && !(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::smipConcentric)) {
wxString msg_text = _L("When using support material for the support interface, We recommand the following settings:\n"
"0 top distance, 0 interface spacing, concentric pattern.");
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::smipConcentric));
m_config_manipulation.apply(m_config, &new_conf);
}
wxGetApp().plater()->update();
}
}
// BBS
#if 0
if (opt_key == "extruders_count")