diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 6302325f0d..0ad8b132b9 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -454,7 +454,8 @@ void GCodeProcessor::TimeMachine::calculate_time(GCodeProcessorResult& result, P const float feedrate = interpolate ? lerp(prev_move.feedrate, curr_move.feedrate, t) : curr_move.feedrate; const float width = interpolate ? lerp(prev_move.width, curr_move.width, t) : curr_move.width; const float height = interpolate ? lerp(prev_move.height, curr_move.height, t) : curr_move.height; - const float mm3_per_mm = interpolate ? lerp(prev_move.mm3_per_mm, curr_move.mm3_per_mm, t) : curr_move.mm3_per_mm; + // ORCA: Fix issue with flow rate changes being visualized incorrectly + const float mm3_per_mm = curr_move.mm3_per_mm; const float fan_speed = interpolate ? lerp(prev_move.fan_speed, curr_move.fan_speed, t) : curr_move.fan_speed; const float temperature = interpolate ? lerp(prev_move.temperature, curr_move.temperature, t) : curr_move.temperature; actual_speed_moves.push_back({ @@ -482,7 +483,8 @@ void GCodeProcessor::TimeMachine::calculate_time(GCodeProcessorResult& result, P const float feedrate = interpolate ? lerp(prev_move.feedrate, curr_move.feedrate, t) : curr_move.feedrate; const float width = interpolate ? lerp(prev_move.width, curr_move.width, t) : curr_move.width; const float height = interpolate ? lerp(prev_move.height, curr_move.height, t) : curr_move.height; - const float mm3_per_mm = interpolate ? lerp(prev_move.mm3_per_mm, curr_move.mm3_per_mm, t) : curr_move.mm3_per_mm; + // ORCA: Fix issue with flow rate changes being visualized incorrectly + const float mm3_per_mm = curr_move.mm3_per_mm; const float fan_speed = interpolate ? lerp(prev_move.fan_speed, curr_move.fan_speed, t) : curr_move.fan_speed; const float temperature = interpolate ? lerp(prev_move.temperature, curr_move.temperature, t) : curr_move.temperature; actual_speed_moves.push_back({ diff --git a/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp b/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp index 93546538ad..b71d7cb3e9 100644 --- a/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp +++ b/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp @@ -210,7 +210,9 @@ GCodeInputData convert(const Slic3r::GCodeProcessorResult& result, const std::ve const EMoveType curr_type = convert(curr.type); const EOptionType option_type = move_type_to_option(curr_type); if (option_type == EOptionType::COUNT || option_type == EOptionType::Travels || option_type == EOptionType::Wipes) { - if (ret.vertices.empty() || prev.type != curr.type || prev.extrusion_role != curr.extrusion_role) { + if (ret.vertices.empty() || prev.type != curr.type || prev.extrusion_role != curr.extrusion_role + // ORCA: Fix issue with flow rate changes being visualized incorrectly + || prev.mm3_per_mm != curr.mm3_per_mm) { // to allow libvgcode to properly detect the start/end of a path we need to add a 'phantom' vertex // equal to the current one with the exception of the position, which should match the previous move position, // and the times, which are set to zero