mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-25 05:04:58 +00:00
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:
@@ -49,6 +49,8 @@ static inline FlowRole opt_key_to_flow_role(const std::string &opt_key)
|
||||
return frInfill;
|
||||
else if (opt_key == "internal_solid_infill_line_width")
|
||||
return frSolidInfill;
|
||||
else if (opt_key == "bridge_line_width")
|
||||
return frSolidInfill;
|
||||
else if (opt_key == "top_surface_line_width")
|
||||
return frTopSolidInfill;
|
||||
else if (opt_key == "support_line_width")
|
||||
@@ -67,6 +69,26 @@ double Flow::extrusion_width(const std::string& opt_key, const ConfigOptionFloat
|
||||
{
|
||||
assert(opt != nullptr);
|
||||
|
||||
auto opt_nozzle_diameters = config.option<ConfigOptionFloats>("nozzle_diameter");
|
||||
if (opt_nozzle_diameters == nullptr)
|
||||
throw_on_missing_variable(opt_key, "nozzle_diameter");
|
||||
const float nozzle_diameter = float(opt_nozzle_diameters->get_at(first_printing_extruder));
|
||||
|
||||
if (opt_key == "bridge_line_width") {
|
||||
if (opt->percent) {
|
||||
const double bridge_width = opt->get_abs_value(nozzle_diameter);
|
||||
if (bridge_width > 0.)
|
||||
return bridge_width;
|
||||
} else if (opt->value > 0.) {
|
||||
return opt->value;
|
||||
}
|
||||
|
||||
opt = config.option<ConfigOptionFloatOrPercent>("internal_solid_infill_line_width");
|
||||
if (opt == nullptr)
|
||||
throw_on_missing_variable(opt_key, "internal_solid_infill_line_width");
|
||||
return extrusion_width("internal_solid_infill_line_width", opt, config, first_printing_extruder);
|
||||
}
|
||||
|
||||
#if 0
|
||||
// This is the logic used for skit / brim, but not for the rest of the 1st layer.
|
||||
if (opt->value == 0. && first_layer) {
|
||||
@@ -84,17 +106,13 @@ double Flow::extrusion_width(const std::string& opt_key, const ConfigOptionFloat
|
||||
throw_on_missing_variable(opt_key, "line_width");
|
||||
}
|
||||
|
||||
auto opt_nozzle_diameters = config.option<ConfigOptionFloats>("nozzle_diameter");
|
||||
if (opt_nozzle_diameters == nullptr)
|
||||
throw_on_missing_variable(opt_key, "nozzle_diameter");
|
||||
|
||||
if (opt->percent) {
|
||||
return opt->get_abs_value(float(opt_nozzle_diameters->get_at(first_printing_extruder)));
|
||||
return opt->get_abs_value(nozzle_diameter);
|
||||
}
|
||||
|
||||
if (opt->value == 0.) {
|
||||
// If user left option to 0, calculate a sane default width.
|
||||
return auto_extrusion_width(opt_key_to_flow_role(opt_key), float(opt_nozzle_diameters->get_at(first_printing_extruder)));
|
||||
return auto_extrusion_width(opt_key_to_flow_role(opt_key), nozzle_diameter);
|
||||
}
|
||||
|
||||
return opt->value;
|
||||
|
||||
Reference in New Issue
Block a user