mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-28 05:12:27 +00:00
Feature: Fuzzy Skin Extrusion Mode (#9878)
* Feature: Fuzzy Skin Extrusion Mode This extension allows you to add new features to the fuzzy skin generator. * Add auto switch to Arachne mode * Move dialog to `update_print_fff_config` and update how `is_msg_dlg_already_exist` is used --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
@@ -486,7 +486,24 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
apply(config, &new_conf);
|
||||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
|
||||
|
||||
bool have_arachne = config->opt_enum<PerimeterGeneratorType>("wall_generator") == PerimeterGeneratorType::Arachne;
|
||||
if (config->opt_enum<FuzzySkinMode>("fuzzy_skin_mode") != FuzzySkinMode::Displacement && !have_arachne) {
|
||||
wxString msg_text = _(L("Both [Extrusion] and [Combined] modes of Fuzzy Skin require the Arachne Wall Generator to be enabled."));
|
||||
msg_text += "\n\n" + _(L("Change these settings automatically?\n"
|
||||
"Yes - Enable Arachne Wall Generator\n"
|
||||
"No - Disable Arachne Wall Generator and set [Displacement] mode of the Fuzzy Skin"));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxYES | wxNO);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
auto answer = dialog.ShowModal();
|
||||
if (answer == wxID_YES)
|
||||
new_conf.set_key_value("wall_generator", new ConfigOptionEnum<PerimeterGeneratorType>(PerimeterGeneratorType::Arachne));
|
||||
else
|
||||
new_conf.set_key_value("fuzzy_skin_mode", new ConfigOptionEnum<FuzzySkinMode>(FuzzySkinMode::Displacement));
|
||||
apply(config, &new_conf);
|
||||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigManipulation::apply_null_fff_config(DynamicPrintConfig *config, std::vector<std::string> const &keys, std::map<ObjectBase *, ModelConfig *> const &configs)
|
||||
|
||||
@@ -2454,6 +2454,7 @@ optgroup->append_single_option_line("skirt_loops", "others_settings_skirt#loops"
|
||||
|
||||
optgroup = page->new_optgroup(L("Fuzzy Skin"), L"fuzzy_skin");
|
||||
optgroup->append_single_option_line("fuzzy_skin", "others_settings_special_mode#fuzzy-skin");
|
||||
optgroup->append_single_option_line("fuzzy_skin_mode");
|
||||
optgroup->append_single_option_line("fuzzy_skin_noise_type", "others_settings_special_mode#fuzzy-skin-mode");
|
||||
optgroup->append_single_option_line("fuzzy_skin_point_distance", "others_settings_special_mode#point-distance");
|
||||
optgroup->append_single_option_line("fuzzy_skin_thickness", "others_settings_special_mode#skin-thickness");
|
||||
|
||||
Reference in New Issue
Block a user