mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-01 06:16:58 +00:00
Elefant foot compensation for solid layers (#11526)
* Elefant foot compensation for solid layers Elefant foot compensation for solid layers above bottommost by infill density manipulation. * Update Fill.cpp * change the option to expert cat * use is_approx for float --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -1320,7 +1320,14 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
|||||||
params.density = f->print_object_config->internal_bridge_density.get_abs_value(1.0);
|
params.density = f->print_object_config->internal_bridge_density.get_abs_value(1.0);
|
||||||
params.dont_adjust = true;
|
params.dont_adjust = true;
|
||||||
}
|
}
|
||||||
// BBS: make fill
|
// Orca: Elefant foot compensation for solid layers above bottommost by infill density manipulation.
|
||||||
|
float elefant_density = f->print_object_config->elefant_foot_layers_density.get_abs_value(1.0);
|
||||||
|
if (!is_approx(elefant_density, 1.0f) && surface_fill.surface.is_solid_infill()) {
|
||||||
|
size_t elefant_layers = f->print_object_config->elefant_foot_compensation_layers.value;
|
||||||
|
if (f->layer_id > 0 && f->layer_id <= elefant_layers)
|
||||||
|
params.density = elefant_density * (elefant_layers - (f->layer_id - 1)) / elefant_layers;
|
||||||
|
}
|
||||||
|
// make fill
|
||||||
f->fill_surface_extrusion(&surface_fill.surface,
|
f->fill_surface_extrusion(&surface_fill.surface,
|
||||||
params,
|
params,
|
||||||
m_regions[surface_fill.region_id]->fills.entities);
|
m_regions[surface_fill.region_id]->fills.entities);
|
||||||
|
|||||||
@@ -919,7 +919,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||||||
"outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width",
|
"outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width",
|
||||||
"skin_infill_line_width","skeleton_infill_line_width",
|
"skin_infill_line_width","skeleton_infill_line_width",
|
||||||
"top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow",
|
"top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow",
|
||||||
"elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower", "prime_tower_enable_framework",
|
"elefant_foot_compensation", "elefant_foot_compensation_layers", "elefant_foot_layers_density", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower", "prime_tower_enable_framework",
|
||||||
"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_volume",
|
"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_volume",
|
||||||
"prime_tower_infill_gap",
|
"prime_tower_infill_gap",
|
||||||
"prime_tower_flat_ironing",
|
"prime_tower_flat_ironing",
|
||||||
|
|||||||
@@ -695,6 +695,18 @@ void PrintConfigDef::init_common_params()
|
|||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionInt(1));
|
def->set_default_value(new ConfigOptionInt(1));
|
||||||
|
|
||||||
|
def = this->add("elefant_foot_layers_density", coPercent);
|
||||||
|
def->label = L("Elefant foot layers density");
|
||||||
|
def->category = L("Quality");
|
||||||
|
def->tooltip = L("Density of internal solid infill for elefant foot layers compensation. "
|
||||||
|
"The initial value for the second layer is set. "
|
||||||
|
"Subsequent layers become linearly denser by the height specified in elefant_foot_compensation_layers. ");
|
||||||
|
def->sidetext = "%";
|
||||||
|
def->min = 50;
|
||||||
|
def->max = 100;
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionPercent(100));
|
||||||
|
|
||||||
def = this->add("layer_height", coFloat);
|
def = this->add("layer_height", coFloat);
|
||||||
def->label = L("Layer height");
|
def->label = L("Layer height");
|
||||||
def->category = L("Quality");
|
def->category = L("Quality");
|
||||||
|
|||||||
@@ -898,6 +898,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||||||
((ConfigOptionBool, bridge_no_support))
|
((ConfigOptionBool, bridge_no_support))
|
||||||
((ConfigOptionFloat, elefant_foot_compensation))
|
((ConfigOptionFloat, elefant_foot_compensation))
|
||||||
((ConfigOptionInt, elefant_foot_compensation_layers))
|
((ConfigOptionInt, elefant_foot_compensation_layers))
|
||||||
|
((ConfigOptionPercent, elefant_foot_layers_density))
|
||||||
((ConfigOptionFloat, max_bridge_length))
|
((ConfigOptionFloat, max_bridge_length))
|
||||||
((ConfigOptionFloatOrPercent, line_width))
|
((ConfigOptionFloatOrPercent, line_width))
|
||||||
// Force the generation of solid shells between adjacent materials/volumes.
|
// Force the generation of solid shells between adjacent materials/volumes.
|
||||||
|
|||||||
@@ -1092,6 +1092,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||||||
} else if (
|
} else if (
|
||||||
opt_key == "elefant_foot_compensation"
|
opt_key == "elefant_foot_compensation"
|
||||||
|| opt_key == "elefant_foot_compensation_layers"
|
|| opt_key == "elefant_foot_compensation_layers"
|
||||||
|
|| opt_key == "elefant_foot_layers_density"
|
||||||
|| opt_key == "support_top_z_distance"
|
|| opt_key == "support_top_z_distance"
|
||||||
|| opt_key == "support_bottom_z_distance"
|
|| opt_key == "support_bottom_z_distance"
|
||||||
|| opt_key == "xy_hole_compensation"
|
|| opt_key == "xy_hole_compensation"
|
||||||
|
|||||||
@@ -721,7 +721,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||||||
toggle_line("brim_ears_detection_length", have_brim_ear);
|
toggle_line("brim_ears_detection_length", have_brim_ear);
|
||||||
|
|
||||||
// Hide Elephant foot compensation layers if elefant_foot_compensation is not enabled
|
// Hide Elephant foot compensation layers if elefant_foot_compensation is not enabled
|
||||||
toggle_line("elefant_foot_compensation_layers", config->opt_float("elefant_foot_compensation") > 0);
|
toggle_line("elefant_foot_compensation_layers", config->opt_float("elefant_foot_compensation") > 0 || config->option<ConfigOptionPercent>("elefant_foot_layers_density")->get_abs_value(1.0f) < 1.0f);
|
||||||
|
|
||||||
bool have_raft = config->opt_int("raft_layers") > 0;
|
bool have_raft = config->opt_int("raft_layers") > 0;
|
||||||
bool have_support_material = config->opt_bool("enable_support") || have_raft;
|
bool have_support_material = config->opt_bool("enable_support") || have_raft;
|
||||||
|
|||||||
@@ -2288,6 +2288,7 @@ void TabPrint::build()
|
|||||||
optgroup->append_single_option_line("xy_hole_compensation", "quality_settings_precision#x-y-compensation");
|
optgroup->append_single_option_line("xy_hole_compensation", "quality_settings_precision#x-y-compensation");
|
||||||
optgroup->append_single_option_line("xy_contour_compensation", "quality_settings_precision#x-y-compensation");
|
optgroup->append_single_option_line("xy_contour_compensation", "quality_settings_precision#x-y-compensation");
|
||||||
optgroup->append_single_option_line("elefant_foot_compensation", "quality_settings_precision#elephant-foot-compensation");
|
optgroup->append_single_option_line("elefant_foot_compensation", "quality_settings_precision#elephant-foot-compensation");
|
||||||
|
optgroup->append_single_option_line("elefant_foot_layers_density", "quality_settings_precision#elephant-foot-compensation");
|
||||||
optgroup->append_single_option_line("elefant_foot_compensation_layers", "quality_settings_precision#elephant-foot-compensation");
|
optgroup->append_single_option_line("elefant_foot_compensation_layers", "quality_settings_precision#elephant-foot-compensation");
|
||||||
optgroup->append_single_option_line("precise_outer_wall", "quality_settings_precision#precise-wall");
|
optgroup->append_single_option_line("precise_outer_wall", "quality_settings_precision#precise-wall");
|
||||||
optgroup->append_single_option_line("precise_z_height", "quality_settings_precision#precise-z-height");
|
optgroup->append_single_option_line("precise_z_height", "quality_settings_precision#precise-z-height");
|
||||||
|
|||||||
Reference in New Issue
Block a user