Fix erroneous interpolation on speed, flow rate in speed and flow views (#11848)

# Description

Reverts to default orca behaviour of showing the gcode speeds and flow values instead of an interpolation to the next segment.

The existing behaviour incorrectly shows the next G1 XY command following a bridge or overhang as interpolated when using the speed and flow views. This is inconsistent with both actual speed (as its limited to a single segment) and gcode view (as it shows a speed gradient where there is none in the gcode).

Before / after
![image](https://github.com/user-attachments/assets/f3dc1130-40cf-48e6-8da4-ef4b7df15721)
![image](https://github.com/user-attachments/assets/a14c88f7-07dd-4076-be82-dbc13b05ad00)

![image](https://github.com/user-attachments/assets/7876e297-2f59-4adf-bd13-c1da75117d33)


Actual speed and flow views are unaffected

![image](https://github.com/user-attachments/assets/c71d6361-9190-4bb4-8b44-40131b1c4b8f)
![image](https://github.com/user-attachments/assets/e97bf6cc-e2ab-4aed-8130-b41f3e4a7ed2)
This commit is contained in:
Ioannis Giannakas
2026-01-08 15:14:46 +00:00
committed by GitHub
parent 6d3e0de4d9
commit 4af168bac7

View File

@@ -451,7 +451,9 @@ void GCodeProcessor::TimeMachine::calculate_time(GCodeProcessorResult& result, P
if ((position - prev_move.position).norm() > EPSILON &&
(position - curr_move.position).norm() > EPSILON) {
const float delta_extruder = interpolate ? lerp(prev_move.delta_extruder, curr_move.delta_extruder, t) : curr_move.delta_extruder;
const float feedrate = interpolate ? lerp(prev_move.feedrate, curr_move.feedrate, t) : curr_move.feedrate;
const float feedrate = curr_move.feedrate; // ORCA: set feedrate to the gcode feed rate to prevent visualiser from
// displaying erroneous speed transition when actual speed/actual flow views are NOT selected.
// 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;
// ORCA: Fix issue with flow rate changes being visualized incorrectly
@@ -480,7 +482,9 @@ void GCodeProcessor::TimeMachine::calculate_time(GCodeProcessorResult& result, P
if ((position - prev_move.position).norm() > EPSILON &&
(position - curr_move.position).norm() > EPSILON) {
const float delta_extruder = interpolate ? lerp(prev_move.delta_extruder, curr_move.delta_extruder, t) : curr_move.delta_extruder;
const float feedrate = interpolate ? lerp(prev_move.feedrate, curr_move.feedrate, t) : curr_move.feedrate;
const float feedrate = curr_move.feedrate; // ORCA: set feedrate to the gcode feed rate to prevent visualiser from
// displaying erroneous speed transition when actual speed/actual flow views are NOT selected.
// 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;
// ORCA: Fix issue with flow rate changes being visualized incorrectly