mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 15:38:43 +03:00
add elefant_foot_compensation_layers
This commit is contained in:
@@ -485,6 +485,8 @@ static std::vector<std::string> s_Preset_print_options {
|
||||
,"only_one_wall_first_layer"
|
||||
//w25
|
||||
,"slow_down_layers"
|
||||
//w26
|
||||
,"elefant_foot_compensation_layers"
|
||||
};
|
||||
|
||||
static std::vector<std::string> s_Preset_filament_options {
|
||||
|
||||
@@ -309,6 +309,18 @@ void PrintConfigDef::init_common_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.));
|
||||
|
||||
//w26
|
||||
def = this->add("elefant_foot_compensation_layers", coInt);
|
||||
def->label = L("Elephant foot compensation layers");
|
||||
def->category = L("Advanced");
|
||||
def->tooltip = L("The number of layers on which the elephant foot compensation will be active. "
|
||||
"The first layer will be shrunk by the elephant foot compensation value, then "
|
||||
"the next layers will be linearly shrunk less, up to the layer indicated by this value.");
|
||||
def->sidetext = L("layers");
|
||||
def->min = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(1));
|
||||
|
||||
def = this->add("thumbnails", coString);
|
||||
def->label = L("G-code thumbnails");
|
||||
def->tooltip = L("Picture sizes to be stored into a .gcode / .bgcode and .sl1 / .sl1s files, in the following format: \"XxY/EXT, XxY/EXT, ...\"\n"
|
||||
@@ -4598,6 +4610,8 @@ void PrintConfigDef::init_sla_params()
|
||||
"support_pillar_diameter", "branchingsupport_pillar_diameter",
|
||||
"relative_correction_x", "relative_correction_y", "relative_correction_z",
|
||||
"elefant_foot_compensation",
|
||||
//w26
|
||||
"elefant_foot_compensation_layers",
|
||||
// int
|
||||
"support_points_density_relative"
|
||||
}) {
|
||||
|
||||
@@ -513,6 +513,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionFloat, brim_width))
|
||||
((ConfigOptionBool, dont_support_bridges))
|
||||
((ConfigOptionFloat, elefant_foot_compensation))
|
||||
//w26
|
||||
((ConfigOptionInt, elefant_foot_compensation_layers))
|
||||
((ConfigOptionFloatOrPercent, extrusion_width))
|
||||
((ConfigOptionFloat, first_layer_acceleration_over_raft))
|
||||
((ConfigOptionFloatOrPercent, first_layer_speed_over_raft))
|
||||
|
||||
@@ -739,6 +739,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||
steps.emplace_back(posSlice);
|
||||
} else if (
|
||||
opt_key == "elefant_foot_compensation"
|
||||
//w26
|
||||
|| opt_key == "elefant_foot_compensation_layers"
|
||||
|| opt_key == "support_material_contact_distance"
|
||||
//w12
|
||||
|| opt_key == "xy_size_compensation"
|
||||
|
||||
@@ -775,7 +775,8 @@ void PrintObject::slice_volumes()
|
||||
0.f;
|
||||
// Uncompensated slices for the first layer in case the Elephant foot compensation is applied.
|
||||
std::vector<ExPolygons> lslices_elfoot_uncompensated;
|
||||
lslices_elfoot_uncompensated.resize(elephant_foot_compensation_scaled > 0 ? std::min(1, (int)m_layers.size()) : 0);
|
||||
//w26
|
||||
lslices_elfoot_uncompensated.resize(elephant_foot_compensation_scaled > 0 ? std::min(m_config.elefant_foot_compensation_layers.value, (int)m_layers.size()) : 0);
|
||||
tbb::parallel_for(
|
||||
tbb::blocked_range<size_t>(0, m_layers.size()),
|
||||
//w12
|
||||
@@ -785,8 +786,8 @@ void PrintObject::slice_volumes()
|
||||
m_print->throw_if_canceled();
|
||||
Layer *layer = m_layers[layer_id];
|
||||
//w24
|
||||
float elfoot = elephant_foot_compensation_scaled > 0 && layer_id < 1 ?
|
||||
elephant_foot_compensation_scaled - (elephant_foot_compensation_scaled / 1) * layer_id :
|
||||
float elfoot = elephant_foot_compensation_scaled > 0 && layer_id < m_config.elefant_foot_compensation_layers.value ?
|
||||
elephant_foot_compensation_scaled - (elephant_foot_compensation_scaled / m_config.elefant_foot_compensation_layers.value) * layer_id :
|
||||
0.f;
|
||||
if (layer->m_regions.size() == 1) {
|
||||
LayerRegion *layerm = layer->m_regions.front();
|
||||
|
||||
@@ -1691,6 +1691,8 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("xy_hole_compensation");
|
||||
optgroup->append_single_option_line("xy_contour_compensation");
|
||||
optgroup->append_single_option_line("elefant_foot_compensation", "elephant-foot-compensation_114487");
|
||||
//w26
|
||||
optgroup->append_single_option_line("elefant_foot_compensation_layers");
|
||||
|
||||
optgroup = page->new_optgroup(L("Arachne perimeter generator"));
|
||||
optgroup->append_single_option_line("wall_transition_angle");
|
||||
@@ -3010,6 +3012,8 @@ void TabPrinter::build_sla()
|
||||
optgroup->append_line(line);
|
||||
optgroup->append_single_option_line("absolute_correction");
|
||||
optgroup->append_single_option_line("elefant_foot_compensation");
|
||||
//w26
|
||||
optgroup->append_single_option_line("elefant_foot_compensation_layers");
|
||||
optgroup->append_single_option_line("elefant_foot_min_width");
|
||||
optgroup->append_single_option_line("gamma_correction");
|
||||
|
||||
@@ -5610,6 +5614,7 @@ std::vector<std::pair<std::string, std::vector<std::string>>> material_overrides
|
||||
{"Corrections", {
|
||||
"relative_correction",
|
||||
"elefant_foot_compensation"
|
||||
|
||||
}}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user