Pronterface has pretty simple code that estimates time by taking acceleration into account. You could just hard code it to use the default ultimaker fw acceleration settings, that would make it a lot closer to accurate for most people.
Link to estimation code in pronterface: https://github.com/kliment/Printrun/blob/1921d2abae5c1c0ac35886f1c1f6acdeaa4dff9a/printrun/gcoder.py#L354
It still misses a few things (like taking into account maximum feedrates, acceleration of the E axis, etc) but it's a lot closer to the actual time taken than the naive approach of assuming no acceleration. As gr5 mentions, the ideal method would be to read the actual acceleration parameters from Marlin and use those in the formulas, but as it is the current estimate is basically useless, since the print time tends to vary from 1.5x to 4x of what it tells me.
I haven't looked at the code, but I believe RepetierHost does something similar in how it estimates the print time.
Recommended Posts
gr5 2,268
Cura sends to Marlin line segments and print speed. It estimates the time by calculating how long it would take at that speed. Marlin then has default acceleration (and "jerk") parmeters and the actual time to do a short segment is much slower because it doesn't get up to speed.
So for parts with lots of small line segments e.g. small parts, it is off by a lot. For large parts with long straight line segments it's pretty damn accurate. Cura always gives you the minimum. Noone has ever said it took 1/4 the time Cura expected.
For cura to get accurate times it would need to import a dozen or so parameters from Marlin and know that you have Marlin as different firmware does different things. There are more important things for daid to do at this point.
Link to post
Share on other sites