This is something that has been on my mind for a long time, but I never got around to ask since I have been using rs.EnableRedraw(False/True) to work around the “issue”.
Why is the script excecution speed linked to Rhino’s FPS? I mean, I would like a script to run as fast as it can and have Rhino updating the view as fast as it can, with out those two being influenced by each other. In other words having them run in parallel.
In example: (not the best, but the first simple one I could think of)
Say I want to calculate 1000 intersections and give the user a visual feedback on how the progress is moving along. The script takes 5 second to excecute with redraw off, but the file is heavy and the display mode is rendered, so Rhino only redraws at 10FPS. Now I either have to let the user wait “in the dark” for 5 seconds, OR I can redraw after each intersection and let it take 100 seconds.
OR obviously I can make Rhino redraw every 10 calculations and have it done in 10 seconds, or redraw every second. But that requires coding and prediction handling on my side, not knowing if the system is fast or slow, or what kind of display mode is used, or how complex the model was to begin with.
So are there any easy way to have Rhino run the script as fast as it can and update the view in the background when ever the display is ready to update?
( I guess the answer is no, followed with a question about why redrawing every second is a problem and the answer to that is that it requires more coding, bug tracking etc and I would like my script to be as simple as possible so it is easier to understand and thus adjust in the future, for both me and others)
((Or put in simple words: Is there an “if displaypipeline is idle then redraw” function?))
(((And then could this be baked into Rhino python as default?)))