From 6e0d563a2c17ad047b7a2dcb922d2eb15bf884fa Mon Sep 17 00:00:00 2001 From: igiannakas Date: Fri, 3 Jan 2025 16:01:10 +0000 Subject: [PATCH] Internal Bridge angle override --- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 14 +++++++++++++- src/libslic3r/PrintConfig.hpp | 1 + src/libslic3r/PrintObject.cpp | 5 +++++ src/slic3r/GUI/ConfigManipulation.cpp | 2 +- src/slic3r/GUI/GUI_Factories.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 1 + 7 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 4eb5c5e949c..3a10b2dd513 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -800,7 +800,7 @@ static std::vector s_Preset_print_options { "timelapse_type", "wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", "wall_distribution_count", "min_feature_size", "min_bead_width", "post_process", "min_length_factor", - "small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "travel_acceleration","inner_wall_acceleration", "min_width_top_surface", + "small_perimeter_speed", "small_perimeter_threshold","bridge_angle","internal_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", "wipe_before_external_loop", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 2877fa71699..432a9d2e890 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -936,7 +936,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionEnumsGeneric{ (int)Overhang_threshold_bridge }); def = this->add("bridge_angle", coFloat); - def->label = L("Bridge infill direction"); + def->label = L("External bridge infill direction"); def->category = L("Strength"); def->tooltip = L("Bridging angle override. If left to zero, the bridging angle will be calculated " "automatically. Otherwise the provided angle will be used for external bridges. " @@ -945,6 +945,18 @@ void PrintConfigDef::init_fff_params() def->min = 0; def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0.)); + + // ORCA: Internal bridge angle override + def = this->add("internal_bridge_angle", coFloat); + def->label = L("Internal bridge infill direction"); + def->category = L("Strength"); + def->tooltip = L("Internal bridging angle override. If left to zero, the bridging angle will be calculated " + "automatically. Otherwise the provided angle will be used for internal bridges. " + "Use 180°for zero angle.\n\n It is recommended to leave it at 0 unless there is a specific model need not to."); + def->sidetext = L("°"); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloat(0.)); def = this->add("bridge_density", coPercent); def->label = L("Bridge density"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index ee522dab0de..e3760060529 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -897,6 +897,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionInt, bottom_shell_layers)) ((ConfigOptionFloat, bottom_shell_thickness)) ((ConfigOptionFloat, bridge_angle)) + ((ConfigOptionFloat, internal_bridge_angle)) // ORCA: Internal bridge angle override ((ConfigOptionFloat, bridge_flow)) ((ConfigOptionFloat, internal_bridge_flow)) ((ConfigOptionFloat, bridge_speed)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 01d7e242c97..7500ab691e5 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1078,6 +1078,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "rotate_solid_infill_direction" || opt_key == "ensure_vertical_shell_thickness" || opt_key == "bridge_angle" + || opt_key == "internal_bridge_angle" // ORCA: Internal bridge angle override //BBS || opt_key == "bridge_density") { steps.emplace_back(posPrepareInfill); @@ -2738,6 +2739,10 @@ void PrintObject::bridge_over_infill() // Also, use Infill pattern that is neutral for angle determination, since there are no infill lines. bridging_angle = determine_bridging_angle(area_to_be_bridge, to_lines(boundary_plines), InfillPattern::ipLine, 0); } + + // ORCA: Internal bridge angle override + if (candidate.region->region().config().internal_bridge_angle > 0) + bridging_angle = candidate.region->region().config().internal_bridge_angle.value * PI / 180.0; // Convert degrees to radians boundary_plines.insert(boundary_plines.end(), anchors.begin(), anchors.end()); if (!lightning_area.empty() && !intersection(area_to_be_bridge, lightning_area).empty()) { diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 704fdf0dac1..12be20d2f55 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -534,7 +534,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_field(el, has_solid_infill); for (auto el : { "infill_direction", "sparse_infill_line_width", - "sparse_infill_speed", "bridge_speed", "internal_bridge_speed", "bridge_angle","solid_infill_direction", "rotate_solid_infill_direction" }) + "sparse_infill_speed", "bridge_speed", "internal_bridge_speed", "bridge_angle","internal_bridge_angle","solid_infill_direction", "rotate_solid_infill_direction" }) toggle_field(el, have_infill || has_solid_infill); toggle_field("top_shell_thickness", ! has_spiral_vase && has_top_solid_infill); diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index cb0748f2a50..4cfe8521388 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -106,7 +106,7 @@ std::map> SettingsFactory::PART_CAT { L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1}, {"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1}, {"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1}, - {"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1} + {"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"internal_bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1} }}, { L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5}, {"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10}, diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index e3a981287a1..7217247c701 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2146,6 +2146,7 @@ void TabPrint::build() optgroup->append_single_option_line("solid_infill_direction"); optgroup->append_single_option_line("rotate_solid_infill_direction"); optgroup->append_single_option_line("bridge_angle"); + optgroup->append_single_option_line("internal_bridge_angle"); // ORCA: Internal bridge angle override optgroup->append_single_option_line("minimum_sparse_infill_area"); optgroup->append_single_option_line("infill_combination"); optgroup->append_single_option_line("infill_combination_max_layer_height");