add One wall threshold parameter

This commit is contained in:
SoftFever 2023-08-10 10:55:43 +08:00
parent b396f55ddc
commit bb89336285
6 changed files with 23 additions and 6 deletions

View file

@ -806,8 +806,8 @@ void PerimeterGenerator::split_top_surfaces(const ExPolygons &orig_polygons, ExP
else
offset_top_surface = 0;
// don't takes into account too thin areas
// skip if the exposed area is smaller than 2x perimeter width
double min_width_top_surface = std::max(double(ext_perimeter_spacing / 2 + 10), 2.5 * (double(perimeter_width)));
// skip if the exposed area is smaller than "min_width_top_surface"
double min_width_top_surface = std::max(double(ext_perimeter_spacing / 2 + 10), config->min_width_top_surface.get_abs_value(perimeter_width));
Polygons grown_upper_slices = offset(*this->upper_slices, min_width_top_surface);

View file

@ -780,7 +780,7 @@ static std::vector<std::string> s_Preset_print_options {
"wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
"wall_distribution_count", "min_feature_size", "min_bead_width", "post_process",
// SoftFever
"small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "travel_acceleration","inner_wall_acceleration",
"small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "travel_acceleration","inner_wall_acceleration", "min_width_top_surface",
"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",

View file

@ -749,6 +749,21 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Use only one wall on flat top surface, to give more space to the top infill pattern");
def->set_default_value(new ConfigOptionBool(false));
// the tooltip is copied from SuperStudio
def = this->add("min_width_top_surface", coFloatOrPercent);
def->label = L("One wall threshold");
def->category = L("Quality");
def->tooltip = L("If a top surface has to be printed and it's partially covered by another layer, it won't be considered at a top layer where its width is below this value."
" This can be useful to not let the 'one perimeter on top' trigger on surface that should be covered only by perimeters."
" This value can be a mm or a % of the perimeter extrusion width."
"\nWarning: If enabled, artifacts can be created is you have some thin features on the next layer, like letters. Set this setting to 0 to remove these artifacts.");
def->sidetext = L("mm or %");
def->ratio_over = "inner_wall_line_width";
def->min = 0;
def->max_literal = 15;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(300, true));
def = this->add("only_one_wall_first_layer", coBool);
def->label = L("Only one wall on first layer");
def->category = L("Quality");

View file

@ -780,6 +780,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBool, only_one_wall_top))
//SoftFever
((ConfigOptionFloatOrPercent, min_width_top_surface))
((ConfigOptionBool, only_one_wall_first_layer))
((ConfigOptionFloat, print_flow_ratio))
((ConfigOptionFloatOrPercent, seam_gap))