Updated internal bridging flow change and reverted bridge PR (#2943)

Updated internal bridging flow change & reverted bridge PR
This commit is contained in:
Ioannis Giannakas 2023-12-01 15:50:58 +00:00 committed by GitHub
parent 6ba1e6d6ae
commit ae9a2d5929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -487,7 +487,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
params.bridge = is_bridge || Fill::use_bridge_flow(params.pattern); params.bridge = is_bridge || Fill::use_bridge_flow(params.pattern);
params.flow = params.bridge ? params.flow = params.bridge ?
//BBS: always enable thick bridge for internal bridge //BBS: always enable thick bridge for internal bridge
layerm.bridging_flow(extrusion_role, (surface.is_bridge() && !surface.is_external()) || object_config.thick_bridges, params.extrusion_role == erInternalBridgeInfill) : layerm.bridging_flow(extrusion_role, (surface.is_bridge() && !surface.is_external()) || object_config.thick_bridges) :
layerm.flow(extrusion_role, (surface.thickness == -1) ? layer.height : surface.thickness); layerm.flow(extrusion_role, (surface.thickness == -1) ? layer.height : surface.thickness);
// Calculate flow spacing for infill pattern generation. // Calculate flow spacing for infill pattern generation.

View file

@ -4715,6 +4715,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
_mm3_per_mm *= m_config.top_solid_infill_flow_ratio; _mm3_per_mm *= m_config.top_solid_infill_flow_ratio;
else if (path.role() == erBottomSurface) else if (path.role() == erBottomSurface)
_mm3_per_mm *= m_config.bottom_solid_infill_flow_ratio; _mm3_per_mm *= m_config.bottom_solid_infill_flow_ratio;
else if (path.role() == erInternalBridgeInfill)
_mm3_per_mm *= m_config.internal_bridge_flow;
double e_per_mm = m_writer.extruder()->e_per_mm3() * _mm3_per_mm; double e_per_mm = m_writer.extruder()->e_per_mm3() * _mm3_per_mm;

View file

@ -72,7 +72,7 @@ public:
Flow flow(FlowRole role) const; Flow flow(FlowRole role) const;
Flow flow(FlowRole role, double layer_height) const; Flow flow(FlowRole role, double layer_height) const;
Flow bridging_flow(FlowRole role, bool thick_bridge = false, bool internal_bridge = false) const; Flow bridging_flow(FlowRole role, bool thick_bridge = false) const;
void slices_to_fill_surfaces_clipped(); void slices_to_fill_surfaces_clipped();
void prepare_fill_surfaces(); void prepare_fill_surfaces();

View file

@ -32,16 +32,14 @@ Flow LayerRegion::flow(FlowRole role, double layer_height) const
return m_region->flow(*m_layer->object(), role, layer_height, m_layer->id() == 0); return m_region->flow(*m_layer->object(), role, layer_height, m_layer->id() == 0);
} }
Flow LayerRegion::bridging_flow(FlowRole role, bool thick_bridge, bool internal_bridge) const Flow LayerRegion::bridging_flow(FlowRole role, bool thick_bridge) const
{ {
const PrintRegion &region = this->region(); const PrintRegion &region = this->region();
const PrintRegionConfig &region_config = region.config(); const PrintRegionConfig &region_config = region.config();
const PrintObject &print_object = *this->layer()->object(); const PrintObject &print_object = *this->layer()->object();
Flow bridge_flow; Flow bridge_flow;
auto nozzle_diameter = float(print_object.print()->config().nozzle_diameter.get_at(region.extruder(role) - 1)); auto nozzle_diameter = float(print_object.print()->config().nozzle_diameter.get_at(region.extruder(role) - 1));
if(internal_bridge) { // internal bridge is using the thick bridge logic with the internal bridge flow ratio if (thick_bridge) {
bridge_flow = Flow::bridging_flow(float(sqrt(region_config.internal_bridge_flow)) * nozzle_diameter, nozzle_diameter);
} else if (thick_bridge) {
// The old Slic3r way (different from all other slicers): Use rounded extrusions. // 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. // 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. // 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.