Skip to content

Commit

Permalink
Disable small area flow compensation on first layer (Fixes SoftFever#…
Browse files Browse the repository at this point in the history
…4617) (SoftFever#5838)

Co-authored-by: SoftFever <softfeverever@gmail.com>
  • Loading branch information
TheSlashEffect and SoftFever authored Jul 1, 2024
1 parent 1aa5817 commit 7707685
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5442,7 +5442,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
continue;
path_length += line_length;
auto dE = e_per_mm * line_length;
if (m_small_area_infill_flow_compensator && m_config.small_area_infill_flow_compensation.value) {
if (!this->on_first_layer() && m_small_area_infill_flow_compensator
&& m_config.small_area_infill_flow_compensation.value) {
auto oldE = dE;
dE = m_small_area_infill_flow_compensator->modify_flow(line_length, dE, path.role());

Expand Down Expand Up @@ -5482,7 +5483,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
if (line_length < EPSILON)
continue;
auto dE = e_per_mm * line_length;
if (m_small_area_infill_flow_compensator && m_config.small_area_infill_flow_compensation.value) {
if (!this->on_first_layer() && m_small_area_infill_flow_compensator
&& m_config.small_area_infill_flow_compensation.value) {
auto oldE = dE;
dE = m_small_area_infill_flow_compensator->modify_flow(line_length, dE, path.role());

Expand All @@ -5505,7 +5507,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
continue;
const Vec2d center_offset = this->point_to_gcode(arc.center) - this->point_to_gcode(arc.start_point);
auto dE = e_per_mm * arc_length;
if (m_small_area_infill_flow_compensator && m_config.small_area_infill_flow_compensation.value) {
if (!this->on_first_layer() && m_small_area_infill_flow_compensator
&& m_config.small_area_infill_flow_compensation.value) {
auto oldE = dE;
dE = m_small_area_infill_flow_compensator->modify_flow(arc_length, dE, path.role());

Expand Down Expand Up @@ -5593,7 +5596,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
last_set_speed = new_speed;
}
auto dE = e_per_mm * line_length;
if (m_small_area_infill_flow_compensator && m_config.small_area_infill_flow_compensation.value) {
if (!this->on_first_layer() && m_small_area_infill_flow_compensator
&& m_config.small_area_infill_flow_compensation.value) {
auto oldE = dE;
dE = m_small_area_infill_flow_compensator->modify_flow(line_length, dE, path.role());

Expand Down

0 comments on commit 7707685

Please sign in to comment.