mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
ENH: add top_area_threshold param
Jira: 4136 Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Ic8a3d05cea769ae92dd5f2f2fcd685d660075c95
This commit is contained in:
parent
022445b272
commit
7a7a9f4296
9 changed files with 20 additions and 3 deletions
|
@ -1018,7 +1018,7 @@ void PerimeterGenerator::process_classic()
|
|||
else
|
||||
offset_top_surface = 0;
|
||||
//don't takes into account too thin areas
|
||||
double min_width_top_surface = std::max(double(ext_perimeter_spacing / 2 + 10), 1.0 * (double(perimeter_width)));
|
||||
double min_width_top_surface = (this->object_config->top_area_threshold / 100) * std::max(double(ext_perimeter_spacing / 2 + 10), 1.0 * (double(perimeter_width)));
|
||||
|
||||
//BBS: get boungding box of last
|
||||
BoundingBox last_box = get_extents(last);
|
||||
|
@ -1408,7 +1408,7 @@ void PerimeterGenerator::process_arachne()
|
|||
infill_contour = diff_ex(infill_contour, bridge_area);
|
||||
}
|
||||
//BBS: filter small area and extend top surface a bit to hide the wall line
|
||||
double min_width_top_surface = std::max(double(ext_perimeter_spacing / 4 + 10), double(perimeter_width / 4));
|
||||
double min_width_top_surface = (this->object_config->top_area_threshold / 100) * std::max(double(ext_perimeter_spacing / 4 + 10), double(perimeter_width / 4));
|
||||
infill_contour = offset2_ex(infill_contour, -min_width_top_surface, min_width_top_surface + perimeter_width);
|
||||
|
||||
//BBS: get the inner surface that not export to top
|
||||
|
|
|
@ -796,7 +796,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"detect_narrow_internal_solid_infill",
|
||||
"gcode_add_line_number", "enable_arc_fitting", "infill_combination", /*"adaptive_layer_height",*/
|
||||
"support_bottom_interface_spacing", "enable_overhang_speed", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
|
||||
"initial_layer_infill_speed", "top_one_wall_type", "only_one_wall_first_layer",
|
||||
"initial_layer_infill_speed", "top_one_wall_type", "top_area_threshold", "only_one_wall_first_layer",
|
||||
"timelapse_type", "internal_bridge_support_thickness",
|
||||
"wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
||||
"wall_distribution_count", "min_feature_size", "min_bead_width", "post_process",
|
||||
|
|
|
@ -749,6 +749,15 @@ void PrintConfigDef::init_fff_params()
|
|||
def->enum_labels.push_back(L("Topmost surface"));
|
||||
def->set_default_value(new ConfigOptionEnum<TopOneWallType>(TopOneWallType::Alltop));
|
||||
|
||||
def = this->add("top_area_threshold", coPercent);
|
||||
def->label = L("Top area threshold");
|
||||
def->tooltip = L("This factor affects the acreage of top area. The small the number the big the top area.");
|
||||
def->sidetext = L("%");
|
||||
def->min = 0;
|
||||
def->max = 500;
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionPercent(100));
|
||||
|
||||
def = this->add("only_one_wall_first_layer", coBool);
|
||||
def->label = L("Only one wall on first layer");
|
||||
def->category = L("Quality");
|
||||
|
|
|
@ -712,6 +712,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionPercent, min_feature_size))
|
||||
((ConfigOptionPercent, min_bead_width))
|
||||
((ConfigOptionEnum<TopOneWallType>, top_one_wall_type))
|
||||
((ConfigOptionPercent, top_area_threshold))
|
||||
((ConfigOptionBool, only_one_wall_first_layer))
|
||||
// OrcaSlicer
|
||||
((ConfigOptionPercent, seam_gap))
|
||||
|
|
|
@ -710,6 +710,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
} else if (
|
||||
opt_key == "wall_loops"
|
||||
|| opt_key == "top_one_wall_type"
|
||||
|| opt_key == "top_area_threshold"
|
||||
|| opt_key == "only_one_wall_first_layer"
|
||||
|| opt_key == "initial_layer_line_width"
|
||||
|| opt_key == "inner_wall_line_width"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue