diff --git a/src/libslic3r/Flow.hpp b/src/libslic3r/Flow.hpp index 0ad02b318..78d572a55 100644 --- a/src/libslic3r/Flow.hpp +++ b/src/libslic3r/Flow.hpp @@ -87,7 +87,7 @@ public: bool operator==(const Flow &rhs) const { return this->width == rhs.width && this->height == rhs.height && this->nozzle_diameter == rhs.nozzle_diameter && this->bridge == rhs.bridge; } - static Flow new_from_config_width(FlowRole role, const ConfigOptionFloatOrPercent &width, float nozzle_diameter, float height, float bridge_flow_ratio); + static Flow new_from_config_width(FlowRole role, const ConfigOptionFloatOrPercent &width, float nozzle_diameter, float height, float bridge_flow_ratio = 0); // Create a flow from the spacing of extrusion lines. // This method is used exclusively to calculate new flow of 100% infill, where the extrusion width was allowed to scale // to fit a region with integer number of lines. diff --git a/src/libslic3r/GCode/FanMover.cpp b/src/libslic3r/GCode/FanMover.cpp index 1c2cdd732..48091dbec 100644 --- a/src/libslic3r/GCode/FanMover.cpp +++ b/src/libslic3r/GCode/FanMover.cpp @@ -363,7 +363,7 @@ void FanMover::_process_gcode_line(GCodeReader& reader, const GCodeReader::GCode remove_from_buffer(m_buffer.begin()); } } - float sum = 0; + double sum = 0; for (auto& data : m_buffer) sum += data.time; assert( std::abs(m_buffer_time_size - sum) < 0.01); } diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index d5d0f31f7..f076ab8a6 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -955,10 +955,9 @@ WipeTower::ToolChangeResult WipeTower::toolchange_Brim(bool sideOnly, float y_of m_wipe_tower_width, m_wipe_tower_depth); double unscaled_brim_width = m_config->wipe_tower_brim.get_abs_value(m_nozzle_diameter); - Slic3r::Flow brim_flow(m_config->first_layer_extrusion_width.get_abs_value(m_nozzle_diameter), m_layer_height, m_nozzle_diameter); + Slic3r::Flow brim_flow = Flow::new_from_config_width(FlowRole::frPerimeter, m_config->first_layer_extrusion_width, m_layer_height, m_nozzle_diameter); WipeTowerWriter writer(m_layer_height, brim_flow.width, m_gcode_flavor, m_filpar); - std::cout << "flow from " << (m_extrusion_flow * 1.1f) << " to " << brim_flow.mm3_per_mm() << "\n"; writer.set_extrusion_flow(brim_flow.mm3_per_mm()) .set_z(m_z_pos) // Let the writer know the current Z position as a base for Z-hop. .set_initial_tool(m_current_tool) @@ -969,6 +968,7 @@ WipeTower::ToolChangeResult WipeTower::toolchange_Brim(bool sideOnly, float y_of // Extrude X rounds of a brim around the future wipe tower. box_coordinates box(wipeTower_box); box.expand(brim_flow.spacing()- brim_flow.width); // ensure that the brim is attached to the wipe tower + writer.set_initial_position(box.ld); // the brim shall have 'normal' spacing with no extra void space for (float i = 0; i < unscaled_brim_width; i += brim_flow.spacing()) { box.expand(brim_flow.spacing()); diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 24608e974..8f9c14ad0 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1640,8 +1640,7 @@ Flow Print::brim_flow(size_t extruder_id) const frPerimeter, width, (float)m_config.nozzle_diameter.get_at(extruder_id), - (float)this->skirt_first_layer_height(), - 0 + (float)this->skirt_first_layer_height() ); } @@ -1665,8 +1664,7 @@ Flow Print::skirt_flow(size_t extruder_id) const frPerimeter, width, (float)m_config.nozzle_diameter.get_at(extruder_id), - (float)this->skirt_first_layer_height(), - 0 + (float)this->skirt_first_layer_height() ); }