mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
ENH: enable arachne for wall
Refer to prusa and enable arachne for wall. Arachne also has corner case and cause strange slicing result and bad quality when print, while class engine is much better for these cases. Provide option for user to choose. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Ieb3a1c6a457ca610561f8734de4a122d74165afd
This commit is contained in:
parent
4419703f41
commit
6551b86230
10 changed files with 703 additions and 6 deletions
|
@ -313,6 +313,37 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
|
||||
//BBS
|
||||
if (config->opt_enum<PerimeterGeneratorType>("wall_generator") == PerimeterGeneratorType::Arachne &&
|
||||
config->opt_bool("enable_overhang_speed"))
|
||||
{
|
||||
wxString msg_text = _(L("Arachne engine only works when overhang slowing down is disabled.\n"
|
||||
"This may cause decline in the quality of overhang surface when print fastly\n"));
|
||||
if (is_global_config)
|
||||
msg_text += "\n" + _(L("Disable overhang slowing down automatically? \n"
|
||||
"Yes - Enable arachne and disable overhang slowing down\n"
|
||||
"No - Give up using arachne this time"));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "",
|
||||
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
auto answer = dialog.ShowModal();
|
||||
bool enable_overhang_slow_down = true;
|
||||
if (!is_global_config || answer == wxID_YES) {
|
||||
new_conf.set_key_value("enable_overhang_speed", new ConfigOptionBool(false));
|
||||
enable_overhang_slow_down = false;
|
||||
}
|
||||
else {
|
||||
new_conf.set_key_value("wall_generator", new ConfigOptionEnum<PerimeterGeneratorType>(PerimeterGeneratorType::Classic));
|
||||
}
|
||||
apply(config, &new_conf);
|
||||
if (cb_value_change) {
|
||||
if (!enable_overhang_slow_down)
|
||||
cb_value_change("enable_overhang_speed", false);
|
||||
}
|
||||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
|
||||
// BBS
|
||||
int filament_cnt = wxGetApp().preset_bundle->filament_presets.size();
|
||||
#if 0
|
||||
|
@ -607,6 +638,14 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
std::string str_preset_type = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
|
||||
toggle_field("timelapse_type", str_preset_type != "C11");
|
||||
|
||||
bool have_arachne = config->opt_enum<PerimeterGeneratorType>("wall_generator") == PerimeterGeneratorType::Arachne;
|
||||
for (auto el : { "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
||||
"min_feature_size", "min_bead_width", "wall_distribution_count" })
|
||||
toggle_line(el, have_arachne);
|
||||
toggle_field("detect_thin_wall", !have_arachne);
|
||||
toggle_field("enable_overhang_speed", !have_arachne);
|
||||
toggle_field("only_one_wall_top", !have_arachne);
|
||||
}
|
||||
|
||||
void ConfigManipulation::update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config/* = false*/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue