Bridge Line Width + Improve bridge density (#11255)

* Base

* Standarized

Co-Authored-By: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>

* Wiki

* Improved descriptions based in RF47 Tests

Co-Authored-By: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>

* Bridge Flow Wiki

* Removed CMATH

Co-Authored-By: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>

* Default to 100

* Revert "TESTING BRIDGE DENSITY"

This reverts commit 8634f802311cd3877b0dd5651029b30b2d4eab60.

Removed desc change

* Minor changes

Co-Authored-By: Noisyfox <timemanager.rick@gmail.com>

* Update LayerRegion.cpp

* Missing ;

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>

* Restrict bridge line width to nozzle diameter

* Clarification

* Increased both Bridge Densitys to 125

Co-Authored-By: Valerii Bokhan <80919135+valerii-bokhan@users.noreply.github.com>

* Valerii check

Co-Authored-By: Valerii Bokhan <80919135+valerii-bokhan@users.noreply.github.com>

* Fix error handling

* Clarify thick bridges documentation and tooltips

Updated the documentation and tooltips for 'thick_bridges' and 'thick_internal_bridges' to clarify that bridge extrusion uses a line height equal to the nozzle diameter, and to better explain the trade-offs between strength, reliability, and appearance.

* Partially restore bridge_flow description

* Suggestions

---------

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
Co-authored-by: Valerii Bokhan <80919135+valerii-bokhan@users.noreply.github.com>
This commit is contained in:
Ian Bassi
2026-06-03 10:16:59 -03:00
committed by GitHub
parent 065540e48f
commit ae16c76dd2
8 changed files with 137 additions and 48 deletions

View File

@@ -1540,12 +1540,12 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
auto validate_extrusion_width = [min_nozzle_diameter, max_nozzle_diameter](const ConfigBase &config, const char *opt_key, double layer_height, std::string &err_msg) -> bool {
double extrusion_width_min = config.get_abs_value(opt_key, min_nozzle_diameter);
double extrusion_width_max = config.get_abs_value(opt_key, max_nozzle_diameter);
if (extrusion_width_min == 0) {
// Default "auto-generated" extrusion width is always valid.
} else if (extrusion_width_min <= layer_height) {
err_msg = L("Too small line width");
return false;
} else if (extrusion_width_max > max_nozzle_diameter * MAX_LINE_WIDTH_MULTIPLIER) {
if (extrusion_width_min == 0) {
// Default "auto-generated" extrusion width is always valid.
} else if (extrusion_width_min <= layer_height) {
err_msg = L("Too small line width");
return false;
} else if (extrusion_width_max > max_nozzle_diameter * MAX_LINE_WIDTH_MULTIPLIER) {
err_msg = L("Too large line width");
return false;
}
@@ -1667,6 +1667,25 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
for (const PrintRegion &region : object->all_regions())
if (!validate_extrusion_width(region.config(), opt_key, layer_height, err_msg))
return {err_msg, object, opt_key};
const bool allow_thin_bridge_width = object->config().thick_bridges && object->config().thick_internal_bridges;
for (const PrintRegion &region : object->all_regions()) {
const auto &bridge_width_opt = region.config().bridge_line_width;
for (FlowRole bridge_role : { frPerimeter, frInfill, frSolidInfill, frTopSolidInfill }) {
const double nozzle_diameter = m_config.nozzle_diameter.get_at(region.extruder(bridge_role) - 1);
const double bridge_width = bridge_width_opt.get_abs_value(nozzle_diameter);
if (bridge_width <= 0.)
continue;
if (bridge_width > nozzle_diameter) {
err_msg = L("Bridge line width must not exceed nozzle diameter");
return { err_msg, object, "bridge_line_width" };
}
if (!allow_thin_bridge_width && bridge_width <= layer_height) {
err_msg = L("Too small line width");
return { err_msg, object, "bridge_line_width" };
}
}
}
}
}