Enhancement: Internal Bridge angle override (#7908)

Internal Bridge angle override
This commit is contained in:
Ioannis Giannakas 2025-02-09 14:00:16 +00:00 committed by GitHub
parent 4e74aaf144
commit 229a826aa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 23 additions and 4 deletions

View file

@ -820,7 +820,7 @@ static std::vector<std::string> 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",

View file

@ -950,7 +950,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. "
@ -959,6 +959,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");

View file

@ -907,6 +907,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))

View file

@ -1079,6 +1079,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);
@ -2743,6 +2744,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()) {