Add option to set jerk for infills

Signed-off-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
SoftFever 2023-01-22 22:04:47 +08:00
parent 5866d7b756
commit b7bdb65fd3
7 changed files with 17 additions and 5 deletions

View file

@ -3713,7 +3713,10 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
jerk = m_config.inner_wall_jerk.value;
} else if (m_config.top_surface_jerk.value > 0 && is_top_surface(path.role())) {
jerk = m_config.top_surface_jerk.value;
} else {
} else if (m_config.infill_jerk.value > 0 && is_infill(path.role())) {
jerk = m_config.infill_jerk.value;
}
else {
jerk = m_config.default_jerk.value;
}
gcode += m_writer.set_jerk_xy((unsigned int)floor(jerk + 0.5));

View file

@ -750,7 +750,7 @@ static std::vector<std::string> s_Preset_print_options {
"wall_distribution_count", "min_feature_size", "min_bead_width",
// 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", "top_surface_jerk", "initial_layer_jerk","travel_jerk",
"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"

View file

@ -1484,6 +1484,14 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9));
def = this->add("infill_jerk", coFloat);
def->label = L("Infill");
def->tooltip = L("Jerk for infill");
def->sidetext = L("mm/s");
def->min = 1;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9));
def = this->add("initial_layer_jerk", coFloat);
def->label = L("Initial layer");
def->tooltip = L("Jerk for initial layer");

View file

@ -906,6 +906,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloat, default_jerk))
((ConfigOptionFloat, outer_wall_jerk))
((ConfigOptionFloat, inner_wall_jerk))
((ConfigOptionFloat, infill_jerk))
((ConfigOptionFloat, top_surface_jerk))
((ConfigOptionFloat, initial_layer_jerk))
((ConfigOptionFloat, travel_jerk))