Added new parameter elefant_foot_min_width

This commit is contained in:
tamasmeszaros 2020-02-06 16:28:02 +01:00
parent 96d5c8c35d
commit 41d77b492c
7 changed files with 30 additions and 5 deletions

View file

@ -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");

View file

@ -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);

View file

@ -786,6 +786,7 @@ bool SLAPrint::invalidate_state_by_config_options(const std::vector<t_config_opt
"relative_correction",
"absolute_correction",
"elefant_foot_compensation",
"elefant_foot_min_width",
"gamma_correction"
};

View file

@ -80,6 +80,19 @@ SLAPrint::Steps::Steps(SLAPrint *print)
, objectstep_scale{(max_objstatus - min_objstatus) / (objcount * 100.0)}
{}
void SLAPrint::Steps::apply_elefant_foot_compensation(SLAPrintObject &po, SliceOrigin o)
{
auto faded_lyrs = size_t(po.m_config.faded_layers.getInt());
faded_lyrs = std::min(po.m_slice_index.size(), faded_lyrs);
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);
}
}
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();

View file

@ -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);

View file

@ -558,6 +558,7 @@ const std::vector<std::string>& 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",

View file

@ -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")));