Conversation
Add a C++ TimeEstimator alongside GCodeRenderer so the parse reports a run-time estimate, and show that estimate in the GUIs while a program runs.
015db44 to
a244833
Compare
|
If you had an error, or you stopped midway, users might want the progress time of when that happened trough the process to be visible, instead of resetting back to the estimate? Just looked at the video resetting back, not sure what happens for real will test tomorrow... |
When program executes it simply adds calculated seconds of remaining steps to time that already passed. After program finished it resets back to calculated value [ exactly like you loaded the same program again ] . I believe that is correct because if program was paused for something, tool change take long time, or if user used feed-override 10%, we cannot expect it to happen on next run. It is possible to display difference of last run to estimate but it will overload UI with info. |
Proposal Add a C++ TimeEstimator alongside GCodeRenderer so the parse reports a run-time estimate, and show that estimate in the GUIs while a program runs.
Estimation is done during gcode/preview rendering parse so it is almost free.
It is supposed to replace program execution progress calculated by feed length [ used by gmoccapy ] .
out.mp4
Assumptions made
Motion model
TP_DEFAULT_QUEUE_SIZE) over trapezoid profiles, not TP's actual blending. Moves beyond 32 ahead cannot influence the current one.min(v_peak) * max(0, cos θ)— collinear passes at full speed, a right angle stops. G61 vs G64, the blend tolerance, and naive-cam are not distinguished; every program is timed as if blended by that one cosine.getStraightVelocity's rule): XYZ if it moves, else UVW, else ABC. A move mixing linear and rotary is capped by all nine axes; a pure one only by its own kind.sqrt(0.866 · a · r)(BLEND_ACC_RATIO_NORMAL), and arcs enter as their drawn segments, so segment chord length sets the junction angles.MAX_VELOCITYbut noMAX_ACCELERATIONcontributes no ramp time at all.[TRAJ]velocity/acceleration caps apply only to cartesian moves, never to rotary-only ones.Nominal 100%
Overrides, adaptive feed, feed hold, and M0/M1/M66 waits are not modelled.
M1xxcosts zero time — it only drains the queue to a stop. The number is what the program would take untouched.Specific commands
probe-full-lengthcss-unboundedsync-no-spindlezero-feedpitch · rpm, retract atpitch · rpm · retract_scale, full stop each way[DISPLAY]TOOL_CHANGE_SECONDS, default 0 — not an ini standard, so most configs get a free tool changeSpindle dynamics are absent throughout: a commanded S is in effect immediately, with no spin-up and no wait-for-at-speed.
Table and GUI
TIME_SAMPLE_RESOLUTION), which bounds the table by runtime rather than line count. Samples are exact — thinning drops rows, it never averages.remainingis still computed from the line, so only the choice among duplicates is affected).at_lineclamps: before the first sample = 0, past the last =total.steady_seconds) so per-sample interpolation noise doesn't flicker the number.gcode.TimeEstimateCanonand supplyingmachine_limits.Total time is shifted while program executes [ if necessary - for example tool change takes long or program paused ] . After program stop it reverts back to calculated value.