diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 835bde61bb..fa965bbbfb 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3715,8 +3715,12 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, #endif } else if (m_config.get_abs_value("bridge_acceleration") > 0 && is_bridge(path.role())) { acceleration = m_config.get_abs_value("bridge_acceleration"); + } else if (m_config.get_abs_value("sparse_infill_acceleration") > 0 && (path.role() == erInternalInfill)) { + acceleration = m_config.get_abs_value("sparse_infill_acceleration"); + } else if (m_config.get_abs_value("internal_solid_infill_acceleration") > 0 && (path.role() == erSolidInfill)) { + acceleration = m_config.get_abs_value("internal_solid_infill_acceleration"); } else if (m_config.outer_wall_acceleration.value > 0 && is_external_perimeter(path.role())) { - acceleration = m_config.outer_wall_acceleration.value; + acceleration = m_config.outer_wall_acceleration.value; } else if (m_config.inner_wall_acceleration.value > 0 && is_internal_perimeter(path.role())) { acceleration = m_config.inner_wall_acceleration.value; } else if (m_config.top_surface_acceleration.value > 0 && is_top_surface(path.role())) { diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 856690a012..ee93a9b951 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -751,8 +751,9 @@ static std::vector s_Preset_print_options { // SoftFever "small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "post_process", "travel_acceleration","inner_wall_acceleration", "default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk", - "top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", - "print_flow_ratio","seam_gap","role_based_wipe_speed","wipe_speed","accel_to_decel_enable", "accel_to_decel_factor", "wipe_on_loops", "bridge_density", "precise_outer_wall", "overhang_speed_classic", "bridge_acceleration" + "top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", "print_flow_ratio", "seam_gap", + "role_based_wipe_speed", "wipe_speed", "accel_to_decel_enable", "accel_to_decel_factor", "wipe_on_loops", + "bridge_density", "precise_outer_wall", "overhang_speed_classic", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration" }; diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index e3cd5fab42..fceed2a00d 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -106,6 +106,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "top_surface_acceleration", "bridge_acceleration", "travel_acceleration", + "sparse_infill_acceleration", + "internal_solid_infill_acceleration" // BBS "cool_plate_temp_initial_layer", "eng_plate_temp_initial_layer", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index dffbf21334..7a7c90b978 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1476,6 +1476,24 @@ void PrintConfigDef::init_fff_params() def->ratio_over = "outer_wall_acceleration"; def->set_default_value(new ConfigOptionFloatOrPercent(50,true)); + def = this->add("sparse_infill_acceleration", coFloatOrPercent); + def->label = L("Sparse infill"); + def->tooltip = L("Acceleration of sparse infill. If the value is expressed as a percentage (e.g. 100%), it will be calculated based on the default acceleration."); + def->sidetext = L("mm/s² or %"); + def->min = 0; + def->mode = comAdvanced; + def->ratio_over = "default_acceleration"; + def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); + + def = this->add("internal_solid_infill_acceleration", coFloatOrPercent); + def->label = L("Internal solid infill"); + def->tooltip = L("Acceleration of internal solid infill. If the value is expressed as a percentage (e.g. 100%), it will be calculated based on the default acceleration."); + def->sidetext = L("mm/s² or %"); + def->min = 0; + def->mode = comAdvanced; + def->ratio_over = "default_acceleration"; + def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); + def = this->add("initial_layer_acceleration", coFloat); def->label = L("Initial layer"); def->tooltip = L("Acceleration of initial layer. Using a lower value can improve build plate adhensive"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 91ba012bc6..bd726ad525 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -911,6 +911,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloat, initial_layer_acceleration)) ((ConfigOptionFloatOrPercent, bridge_acceleration)) ((ConfigOptionFloat, travel_acceleration)) + ((ConfigOptionFloatOrPercent, sparse_infill_acceleration)) + ((ConfigOptionFloatOrPercent, internal_solid_infill_acceleration)) ((ConfigOptionFloat, initial_layer_line_width)) ((ConfigOptionFloat, initial_layer_print_height)) ((ConfigOptionFloat, initial_layer_speed)) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index a73fcf68bc..1795ddb04b 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -548,7 +548,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co bool have_default_acceleration = config->opt_float("default_acceleration") > 0; //BBS for (auto el : {"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", - "top_surface_acceleration", "travel_acceleration", "bridge_acceleration"}) + "top_surface_acceleration", "travel_acceleration", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"}) toggle_field(el, have_default_acceleration); bool have_default_jerk = config->opt_float("default_jerk") > 0; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index d90c71fdae..29ac4c39b5 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1942,6 +1942,8 @@ void TabPrint::build() optgroup->append_single_option_line("outer_wall_acceleration"); optgroup->append_single_option_line("inner_wall_acceleration"); optgroup->append_single_option_line("bridge_acceleration"); + optgroup->append_single_option_line("sparse_infill_acceleration"); + optgroup->append_single_option_line("internal_solid_infill_acceleration"); optgroup->append_single_option_line("initial_layer_acceleration"); optgroup->append_single_option_line("top_surface_acceleration"); optgroup->append_single_option_line("travel_acceleration");