diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index dfea714a8..353a0ae83 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2452,6 +2452,15 @@ void PrintConfigDef::init_sla_params() def->min = 0; def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0.2)); + + def = this->add("elefant_foot_min_width", coFloat); + def->label = L("Elefant foot minimum width"); + def->category = L("Advanced"); + def->tooltip = L("Minimum with of features to maintain when doing EFC"); + def->sidetext = L("mm"); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloat(0.2)); def = this->add("gamma_correction", coFloat); def->label = L("Printer gamma correction"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index f320b3da5..8c6710dad 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1176,6 +1176,7 @@ public: ConfigOptionFloats relative_correction; ConfigOptionFloat absolute_correction; ConfigOptionFloat elefant_foot_compensation; + ConfigOptionFloat elefant_foot_min_width; ConfigOptionFloat gamma_correction; ConfigOptionFloat fast_tilt_time; ConfigOptionFloat slow_tilt_time; @@ -1200,6 +1201,7 @@ protected: OPT_PTR(relative_correction); OPT_PTR(absolute_correction); OPT_PTR(elefant_foot_compensation); + OPT_PTR(elefant_foot_min_width); OPT_PTR(gamma_correction); OPT_PTR(fast_tilt_time); OPT_PTR(slow_tilt_time); diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp index 4bfc77c80..0b26af983 100644 --- a/src/libslic3r/SLAPrint.cpp +++ b/src/libslic3r/SLAPrint.cpp @@ -786,6 +786,7 @@ bool SLAPrint::invalidate_state_by_config_options(const std::vectorm_printer_config.elefant_foot_compensation.getFloat(); + first_sl = elephant_foot_compensation(first_sl, 0., compensation); + } +} + void SLAPrint::Steps::hollow_model(SLAPrintObject &po) { po.m_hollowing_data.reset(); @@ -241,11 +254,7 @@ void SLAPrint::Steps::slice_model(SLAPrintObject &po) double doffs = m_print->m_printer_config.absolute_correction.getFloat(); coord_t clpr_offs = scaled(doffs); - if (!po.m_model_height_levels.empty() && po.m_model_height_levels[0] < ilh) { - auto &first_sl = po.m_model_slices[0]; - double compensation = m_print->m_printer_config.elefant_foot_compensation.getFloat(); - first_sl = elephant_foot_compensation(first_sl, 0., compensation); - } + for(size_t id = 0; id < po.m_model_slices.size() && mit != po.m_slice_index.end(); diff --git a/src/libslic3r/SLAPrintSteps.hpp b/src/libslic3r/SLAPrintSteps.hpp index 0418072cf..b5cb8accc 100644 --- a/src/libslic3r/SLAPrintSteps.hpp +++ b/src/libslic3r/SLAPrintSteps.hpp @@ -43,6 +43,8 @@ private: bool canceled() const { return m_print->canceled(); } void initialize_printer_input(); + void apply_elefant_foot_compensation(SLAPrintObject &po, SliceOrigin o); + public: Steps(SLAPrint *print); diff --git a/src/slic3r/GUI/Preset.cpp b/src/slic3r/GUI/Preset.cpp index f9191b2e7..cedf3d5f8 100644 --- a/src/slic3r/GUI/Preset.cpp +++ b/src/slic3r/GUI/Preset.cpp @@ -558,6 +558,7 @@ const std::vector& Preset::sla_printer_options() "relative_correction", "absolute_correction", "elefant_foot_compensation", + "elefant_foot_min_width", "gamma_correction", "min_exposure_time", "max_exposure_time", "min_initial_exposure_time", "max_initial_exposure_time", diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 1b46ed755..72ee827eb 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2113,6 +2113,7 @@ void TabPrinter::build_sla() optgroup->append_line(line); optgroup->append_single_option_line("absolute_correction"); optgroup->append_single_option_line("elefant_foot_compensation"); + optgroup->append_single_option_line("elefant_foot_min_width"); optgroup->append_single_option_line("gamma_correction"); optgroup = page->new_optgroup(_(L("Exposure")));