mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-22 10:22:08 +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:
@@ -34,16 +34,26 @@ Flow LayerRegion::bridging_flow(FlowRole role, bool thick_bridge) const
|
||||
const PrintRegionConfig ®ion_config = region.config();
|
||||
const PrintObject &print_object = *this->layer()->object();
|
||||
Flow bridge_flow;
|
||||
// Here this->extruder(role) - 1 may underflow to MAX_INT, but then the get_at() will fall back to zero'th element, so everything is all right.
|
||||
auto nozzle_diameter = float(print_object.print()->config().nozzle_diameter.get_at(region.extruder(role) - 1));
|
||||
const ConfigOptionFloatOrPercent& bridge_width_opt = region_config.bridge_line_width;
|
||||
const double bridge_width = bridge_width_opt.get_abs_value(nozzle_diameter);
|
||||
const bool has_bridge_width = bridge_width > 0.;
|
||||
const double bridge_flow_ratio = region_config.bridge_flow;
|
||||
|
||||
if (thick_bridge) {
|
||||
// The old Slic3r way (different from all other slicers): Use rounded extrusions.
|
||||
// Get the configured nozzle_diameter for the extruder associated to the flow role requested.
|
||||
// Here this->extruder(role) - 1 may underflow to MAX_INT, but then the get_at() will follback to zero'th element, so everything is all right.
|
||||
// Applies default bridge spacing.
|
||||
bridge_flow = Flow::bridging_flow(float(sqrt(region_config.bridge_flow)) * nozzle_diameter, nozzle_diameter);
|
||||
float thread_diameter = has_bridge_width ? float(bridge_width) : nozzle_diameter;
|
||||
if (bridge_flow_ratio > 0.)
|
||||
thread_diameter *= float(sqrt(bridge_flow_ratio));
|
||||
bridge_flow = Flow::bridging_flow(thread_diameter, nozzle_diameter);
|
||||
} else {
|
||||
// The same way as other slicers: Use normal extrusions. Apply bridge_flow while maintaining the original spacing.
|
||||
bridge_flow = this->flow(role).with_flow_ratio(region_config.bridge_flow);
|
||||
Flow base_flow = this->flow(role);
|
||||
if (has_bridge_width)
|
||||
base_flow = Flow(float(bridge_width), base_flow.height(), nozzle_diameter);
|
||||
bridge_flow = base_flow.with_flow_ratio(bridge_flow_ratio);
|
||||
}
|
||||
return bridge_flow;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user