update slic3r

This commit is contained in:
QIDI TECH
2025-08-04 16:30:53 +08:00
parent 8d4d60ec48
commit 661b112a68
287 changed files with 22250 additions and 7322 deletions

View File

@@ -245,6 +245,28 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
is_msg_dlg_already_exist = false;
}
//limit scarf start height
double seam_slope_start_height = config->option<ConfigOptionFloatOrPercent>("seam_slope_start_height")->get_abs_value(1);
bool reset_slope_start_height = false;
if (config->option<ConfigOptionFloatOrPercent>("seam_slope_start_height")->percent) {
if (seam_slope_start_height >= 1)
reset_slope_start_height = true;
} else {
if (seam_slope_start_height >= config->opt_float("layer_height"))
reset_slope_start_height = true;
}
if (reset_slope_start_height) {
const wxString msg_text = _(L("Should not large than layer height.\nReset to 10%"));
MessageDialog dialog(nullptr, msg_text, "", wxICON_WARNING | wxOK);
DynamicPrintConfig new_conf = *config;
is_msg_dlg_already_exist = true;
dialog.ShowModal();
new_conf.set_key_value("seam_slope_start_height", new ConfigOptionFloatOrPercent{10, true});
apply(config, &new_conf);
is_msg_dlg_already_exist = false;
}
//QDS: top_area_threshold showed if the top one wall function be applyed
bool top_one_wall_apply = config->opt_enum<TopOneWallType>("top_one_wall_type") == TopOneWallType::None;
toggle_line("top_area_threshold", !top_one_wall_apply);
@@ -602,10 +624,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in
{
bool have_perimeters = config->opt_int("wall_loops") > 0;
for (auto el : { "ensure_vertical_shell_thickness", "detect_thin_wall", "detect_overhang_wall",
"seam_position","seam_gap","wipe_speed", "wall_sequence", "outer_wall_line_width",
"seam_position","seam_placement_away_from_overhangs","seam_gap","wipe_speed", "wall_sequence", "outer_wall_line_width",
"inner_wall_speed", "outer_wall_speed","small_perimeter_speed", "small_perimeter_threshold" })
toggle_field(el, have_perimeters);
SeamPosition seam_pos = config->option<ConfigOptionEnum<SeamPosition>>("seam_position")->value;
toggle_line("seam_placement_away_from_overhangs", seam_pos == SeamPosition::spAligned || seam_pos == SeamPosition::spRear);
bool have_infill = config->option<ConfigOptionPercent>("sparse_infill_density")->value > 0;
// sparse_infill_filament uses the same logic as in Print::extruders()
for (auto el : { "sparse_infill_pattern", "sparse_infill_anchor_max", "infill_combination", "minimum_sparse_infill_area", "sparse_infill_filament", "infill_shift_step", "infill_rotate_step", "symmetric_infill_y_axis"})
@@ -619,7 +644,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in
bool is_locked_zig = config->option<ConfigOptionEnum<InfillPattern>>("sparse_infill_pattern")->value == InfillPattern::ipLockedZag;
toggle_line("infill_shift_step", is_cross_zag || is_locked_zig);
for (auto el : { "skeleton_infill_density", "skin_infill_density", "infill_lock_depth", "skin_infill_depth","skin_infill_line_width", "skeleton_infill_line_width" })
for (auto el : {"skeleton_infill_density", "skin_infill_density", "infill_lock_depth", "skin_infill_depth", "skin_infill_line_width", "skeleton_infill_line_width", "locked_skin_infill_pattern", "locked_skeleton_infill_pattern"})
toggle_line(el, is_locked_zig);
bool is_zig_zag = config->option<ConfigOptionEnum<InfillPattern>>("sparse_infill_pattern")->value == InfillPattern::ipZigZag;
@@ -703,13 +728,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in
//toggle_field("support_closing_radius", have_support_material && support_style == smsSnug);
bool support_is_tree = config->opt_bool("enable_support") && is_tree(support_type);
//1.9.5
for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter", "tree_support_branch_diameter_angle"})
toggle_field(el, support_is_tree);
// hide tree support settings when normal is selected
//1.9.5
for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter", "tree_support_branch_diameter_angle", "max_bridge_length"})
for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter", "tree_support_branch_diameter_angle", "max_bridge_length"})
toggle_line(el, support_is_tree);
toggle_line("support_critical_regions_only", is_auto(support_type) && support_is_tree);
@@ -753,8 +776,8 @@ for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tr
bool have_prime_tower = config->opt_bool("enable_prime_tower");
for (auto el :
{"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_tower_rib_wall", "prime_tower_infill_gap", "prime_tower_enable_framework", "prime_tower_max_speed"})
toggle_line(el, have_prime_tower);
{"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_tower_rib_wall", "prime_tower_infill_gap", "prime_tower_enable_framework", "prime_tower_max_speed"})
toggle_line(el, have_prime_tower);
bool have_rib_wall = config->opt_bool("prime_tower_rib_wall")&&have_prime_tower;
for (auto el : {"prime_tower_extra_rib_length", "prime_tower_rib_width", "prime_tower_fillet_wall"})
@@ -770,6 +793,10 @@ for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tr
for (auto el : { "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed"})
toggle_line(el, has_overhang_speed, variant_index);
bool has_height_slowdown = config->opt_bool("enable_height_slowdown", variant_index);
for (auto el : { "slowdown_start_height", "slowdown_start_speed", "slowdown_start_acc", "slowdown_end_height", "slowdown_end_speed", "slowdown_end_acc" })
toggle_line(el, has_height_slowdown, variant_index);
toggle_line("flush_into_objects", !is_global_config);
toggle_line("print_flow_ratio", !is_global_config);
@@ -814,6 +841,11 @@ for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tr
toggle_field("xy_contour_compensation", !enable_auto_hole_and_contour_compensation);
toggle_line("circle_compensation_manual_offset", enable_auto_hole_and_contour_compensation);
// override filament scarf seam settings
bool override_filament_scarf_seam_settings = config->opt_bool("override_filament_scarf_seam_setting");
for (auto el : {"seam_slope_type", "seam_slope_start_height", "seam_slope_gap", "seam_slope_min_length"})
toggle_line(el, override_filament_scarf_seam_settings);
//w16
bool is_resonance_avoidance = config->opt_bool("resonance_avoidance", 0);
toggle_line("min_resonance_avoidance_speed", is_resonance_avoidance);