Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Updated internal bridging flow change and reverted bridge PR (SoftFev…
Browse files Browse the repository at this point in the history
…er#2943)

Updated internal bridging flow change & reverted bridge PR
  • Loading branch information
igiannakas authored Dec 1, 2023
1 parent 6ba1e6d commit ae9a2d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/libslic3r/Fill/Fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
params.bridge = is_bridge || Fill::use_bridge_flow(params.pattern);
params.flow = params.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);

// Calculate flow spacing for infill pattern generation.
Expand Down
2 changes: 2 additions & 0 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4715,6 +4715,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
_mm3_per_mm *= m_config.top_solid_infill_flow_ratio;
else if (path.role() == erBottomSurface)
_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;
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class LayerRegion

Flow flow(FlowRole role) 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 prepare_fill_surfaces();
Expand Down
6 changes: 2 additions & 4 deletions src/libslic3r/LayerRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

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 PrintRegionConfig &region_config = region.config();
const PrintObject &print_object = *this->layer()->object();
Flow bridge_flow;
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
bridge_flow = Flow::bridging_flow(float(sqrt(region_config.internal_bridge_flow)) * nozzle_diameter, nozzle_diameter);
} else if (thick_bridge) {
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.
Expand Down

0 comments on commit ae9a2d5

Please sign in to comment.