mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
Combined infill max layer height (optional) parameter (#6401)
* Combined infill max layer height parameter * Combine sparse infill - allow % over nozzle diameter too. * Updated defaults and tooltips * Update PrintConfig.cpp
This commit is contained in:
parent
c179a57725
commit
2c5478ee96
7 changed files with 28 additions and 3 deletions
|
@ -794,7 +794,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||||
"tree_support_branch_angle", "tree_support_angle_slow", "tree_support_wall_count", "tree_support_top_rate", "tree_support_branch_distance", "tree_support_tip_diameter",
|
"tree_support_branch_angle", "tree_support_angle_slow", "tree_support_wall_count", "tree_support_top_rate", "tree_support_branch_distance", "tree_support_tip_diameter",
|
||||||
"tree_support_branch_diameter", "tree_support_branch_diameter_angle", "tree_support_branch_diameter_double_wall",
|
"tree_support_branch_diameter", "tree_support_branch_diameter_angle", "tree_support_branch_diameter_double_wall",
|
||||||
"detect_narrow_internal_solid_infill",
|
"detect_narrow_internal_solid_infill",
|
||||||
"gcode_add_line_number", "enable_arc_fitting", "precise_z_height", "infill_combination", /*"adaptive_layer_height",*/
|
"gcode_add_line_number", "enable_arc_fitting", "precise_z_height", "infill_combination","infill_combination_max_layer_height", /*"adaptive_layer_height",*/
|
||||||
"support_bottom_interface_spacing", "enable_overhang_speed", "slowdown_for_curled_perimeters", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
|
"support_bottom_interface_spacing", "enable_overhang_speed", "slowdown_for_curled_perimeters", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
|
||||||
"initial_layer_infill_speed", "only_one_wall_top",
|
"initial_layer_infill_speed", "only_one_wall_top",
|
||||||
"timelapse_type",
|
"timelapse_type",
|
||||||
|
|
|
@ -2812,7 +2812,20 @@ void PrintConfigDef::init_fff_params()
|
||||||
"with original layer height.");
|
"with original layer height.");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionBool(false));
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
|
// Orca: max layer height for combined infill
|
||||||
|
def = this->add("infill_combination_max_layer_height", coFloatOrPercent);
|
||||||
|
def->label = L("Infill combination - Max layer height");
|
||||||
|
def->category = L("Strength");
|
||||||
|
def->tooltip = L("Maximum layer height for the combined sparse infill. \n\nSet it to 0 or 100% to use the nozzle diameter (for maximum reduction in print time) or a value of ~80% to maximize sparse infill strength.\n\n"
|
||||||
|
"The number of layers over which infill is combined is derived by dividing this value with the layer height and rounded down to the nearest decimal.\n\n"
|
||||||
|
"Use either absolute mm values (eg. 0.32mm for a 0.4mm nozzle) or % values (eg 80%). This value must not be larger "
|
||||||
|
"than the nozzle diameter.");
|
||||||
|
def->sidetext = L("mm or %");
|
||||||
|
def->min = 0;
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionFloatOrPercent(100., true));
|
||||||
|
|
||||||
def = this->add("sparse_infill_filament", coInt);
|
def = this->add("sparse_infill_filament", coInt);
|
||||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||||
def->label = L("Infill");
|
def->label = L("Infill");
|
||||||
|
|
|
@ -898,6 +898,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||||
((ConfigOptionFloat, sparse_infill_speed))
|
((ConfigOptionFloat, sparse_infill_speed))
|
||||||
//BBS
|
//BBS
|
||||||
((ConfigOptionBool, infill_combination))
|
((ConfigOptionBool, infill_combination))
|
||||||
|
// Orca:
|
||||||
|
((ConfigOptionFloatOrPercent, infill_combination_max_layer_height))
|
||||||
// Ironing options
|
// Ironing options
|
||||||
((ConfigOptionEnum<IroningType>, ironing_type))
|
((ConfigOptionEnum<IroningType>, ironing_type))
|
||||||
((ConfigOptionEnum<InfillPattern>, ironing_pattern))
|
((ConfigOptionEnum<InfillPattern>, ironing_pattern))
|
||||||
|
|
|
@ -1066,6 +1066,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||||
} else if (
|
} else if (
|
||||||
opt_key == "interface_shells"
|
opt_key == "interface_shells"
|
||||||
|| opt_key == "infill_combination"
|
|| opt_key == "infill_combination"
|
||||||
|
|| opt_key == "infill_combination_max_layer_height"
|
||||||
|| opt_key == "bottom_shell_thickness"
|
|| opt_key == "bottom_shell_thickness"
|
||||||
|| opt_key == "top_shell_thickness"
|
|| opt_key == "top_shell_thickness"
|
||||||
|| opt_key == "minimum_sparse_infill_area"
|
|| opt_key == "minimum_sparse_infill_area"
|
||||||
|
@ -3418,6 +3419,11 @@ void PrintObject::combine_infill()
|
||||||
double nozzle_diameter = std::min(
|
double nozzle_diameter = std::min(
|
||||||
this->print()->config().nozzle_diameter.get_at(region.config().sparse_infill_filament.value - 1),
|
this->print()->config().nozzle_diameter.get_at(region.config().sparse_infill_filament.value - 1),
|
||||||
this->print()->config().nozzle_diameter.get_at(region.config().solid_infill_filament.value - 1));
|
this->print()->config().nozzle_diameter.get_at(region.config().solid_infill_filament.value - 1));
|
||||||
|
|
||||||
|
//Orca: Limit combination of infill to up to infill_combination_max_layer_height
|
||||||
|
const double infill_combination_max_layer_height = region.config().infill_combination_max_layer_height.get_abs_value(nozzle_diameter);
|
||||||
|
nozzle_diameter = infill_combination_max_layer_height > 0 ? std::min(infill_combination_max_layer_height, nozzle_diameter) : nozzle_diameter;
|
||||||
|
|
||||||
// define the combinations
|
// define the combinations
|
||||||
std::vector<size_t> combine(m_layers.size(), 0);
|
std::vector<size_t> combine(m_layers.size(), 0);
|
||||||
{
|
{
|
||||||
|
|
|
@ -527,6 +527,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
||||||
"minimum_sparse_infill_area", "sparse_infill_filament", "infill_anchor_max"})
|
"minimum_sparse_infill_area", "sparse_infill_filament", "infill_anchor_max"})
|
||||||
toggle_line(el, have_infill);
|
toggle_line(el, have_infill);
|
||||||
|
|
||||||
|
bool have_combined_infill = config->opt_bool("infill_combination") && have_infill;
|
||||||
|
toggle_line("infill_combination_max_layer_height", have_combined_infill);
|
||||||
|
|
||||||
// Only allow configuration of open anchors if the anchoring is enabled.
|
// Only allow configuration of open anchors if the anchoring is enabled.
|
||||||
bool has_infill_anchors = have_infill && config->option<ConfigOptionFloatOrPercent>("infill_anchor_max")->value > 0;
|
bool has_infill_anchors = have_infill && config->option<ConfigOptionFloatOrPercent>("infill_anchor_max")->value > 0;
|
||||||
toggle_field("infill_anchor", has_infill_anchors);
|
toggle_field("infill_anchor", has_infill_anchors);
|
||||||
|
|
|
@ -106,7 +106,7 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CAT
|
||||||
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},
|
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},
|
||||||
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},
|
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},
|
||||||
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
|
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
|
||||||
{"infill_combination", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
{"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
||||||
}},
|
}},
|
||||||
{ L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5},
|
{ L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5},
|
||||||
{"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10},
|
{"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10},
|
||||||
|
|
|
@ -2141,6 +2141,7 @@ void TabPrint::build()
|
||||||
optgroup->append_single_option_line("bridge_angle");
|
optgroup->append_single_option_line("bridge_angle");
|
||||||
optgroup->append_single_option_line("minimum_sparse_infill_area");
|
optgroup->append_single_option_line("minimum_sparse_infill_area");
|
||||||
optgroup->append_single_option_line("infill_combination");
|
optgroup->append_single_option_line("infill_combination");
|
||||||
|
optgroup->append_single_option_line("infill_combination_max_layer_height");
|
||||||
optgroup->append_single_option_line("detect_narrow_internal_solid_infill");
|
optgroup->append_single_option_line("detect_narrow_internal_solid_infill");
|
||||||
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
|
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue