FIX: the option to adjust the first layer flow

Change-Id: Icf0c2686cc78c26724438ddc80d1894ac50ec179
Signed-off-by: wenjie.guo <wenjie.guo@bambulab.com>
This commit is contained in:
wenjie.guo 2023-07-20 10:28:39 +08:00 committed by Lane.Wei
parent 646cd5a209
commit a321121acc
5 changed files with 10 additions and 8 deletions

View File

@ -3882,8 +3882,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
// calculate extrusion length per distance unit // calculate extrusion length per distance unit
if( path.role() == erTopSolidInfill ) if( path.role() == erTopSolidInfill )
_mm3_per_mm *= m_config.top_solid_infill_flow_ratio.value; _mm3_per_mm *= m_config.top_solid_infill_flow_ratio.value;
else if (path.role() == erBottomSurface) else if (this->on_first_layer())
_mm3_per_mm *= m_config.bottom_solid_infill_flow_ratio.value; _mm3_per_mm *= m_config.initial_layer_flow_ratio.value;
double e_per_mm = m_writer.extruder()->e_per_mm3() * _mm3_per_mm; double e_per_mm = m_writer.extruder()->e_per_mm3() * _mm3_per_mm;

View File

@ -781,7 +781,7 @@ static std::vector<std::string> s_Preset_print_options {
"timelapse_type", "internal_bridge_support_thickness", "timelapse_type", "internal_bridge_support_thickness",
"wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", "wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
"wall_distribution_count", "min_feature_size", "min_bead_width", "post_process", "wall_distribution_count", "min_feature_size", "min_bead_width", "post_process",
"seam_gap", "wipe_speed", "top_solid_infill_flow_ratio", "bottom_solid_infill_flow_ratio", "seam_gap", "wipe_speed", "top_solid_infill_flow_ratio", "initial_layer_flow_ratio",
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_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",
"filter_out_gap_fill", "filter_out_gap_fill",
// calib // calib

View File

@ -713,9 +713,9 @@ void PrintConfigDef::init_fff_params()
def->mode = comDevelop; def->mode = comDevelop;
def->set_default_value(new ConfigOptionFloat(1)); def->set_default_value(new ConfigOptionFloat(1));
def = this->add("bottom_solid_infill_flow_ratio", coFloat); def = this->add("initial_layer_flow_ratio", coFloat);
def->label = L("Bottom surface flow ratio"); def->label = L("Initial layer flow ratio");
def->tooltip = L("This factor affects the amount of material for bottom solid infill"); def->tooltip = L("This factor affects the amount of material for the initial layer");
def->min = 0; def->min = 0;
def->max = 2; def->max = 2;
def->mode = comDevelop; def->mode = comDevelop;
@ -4155,6 +4155,8 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
opt_key = "enable_prime_tower"; opt_key = "enable_prime_tower";
} else if (opt_key == "wipe_tower_width") { } else if (opt_key == "wipe_tower_width") {
opt_key = "prime_tower_width"; opt_key = "prime_tower_width";
} else if (opt_key == "bottom_solid_infill_flow_ratio") {
opt_key = "initial_layer_flow_ratio";
} else if (opt_key == "wiping_volume") { } else if (opt_key == "wiping_volume") {
opt_key = "prime_volume"; opt_key = "prime_volume";
} else if (opt_key == "wipe_tower_brim_width") { } else if (opt_key == "wipe_tower_brim_width") {

View File

@ -772,7 +772,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloatOrPercent, sparse_infill_anchor_max)) ((ConfigOptionFloatOrPercent, sparse_infill_anchor_max))
//OrcaSlicer //OrcaSlicer
((ConfigOptionFloat, top_solid_infill_flow_ratio)) ((ConfigOptionFloat, top_solid_infill_flow_ratio))
((ConfigOptionFloat, bottom_solid_infill_flow_ratio)) ((ConfigOptionFloat, initial_layer_flow_ratio))
((ConfigOptionFloat, filter_out_gap_fill)) ((ConfigOptionFloat, filter_out_gap_fill))
//calib //calib
((ConfigOptionFloat, print_flow_ratio))) ((ConfigOptionFloat, print_flow_ratio)))

View File

@ -1880,7 +1880,7 @@ void TabPrint::build()
optgroup->append_single_option_line("bridge_flow"); optgroup->append_single_option_line("bridge_flow");
optgroup->append_single_option_line("thick_bridges"); optgroup->append_single_option_line("thick_bridges");
optgroup->append_single_option_line("top_solid_infill_flow_ratio"); optgroup->append_single_option_line("top_solid_infill_flow_ratio");
optgroup->append_single_option_line("bottom_solid_infill_flow_ratio"); optgroup->append_single_option_line("initial_layer_flow_ratio");
optgroup->append_single_option_line("only_one_wall_top"); optgroup->append_single_option_line("only_one_wall_top");
optgroup->append_single_option_line("only_one_wall_first_layer"); optgroup->append_single_option_line("only_one_wall_first_layer");
optgroup->append_single_option_line("detect_overhang_wall"); optgroup->append_single_option_line("detect_overhang_wall");