Rhino not responding when generating huge number of polysurfaces.
I am having trouble generating 800-1000 polysurfaces using a loop. The script works great for small numbers, 200-300, but on large numbers rhino turns to not responding
For sure Rhino can hold more than 1000, i can copy the 200 resulting polysurfaces several times without a problem.
This is not a memory problem(in task manager the memory used barely changes) and not a processing power either, cpu usage doesn't reach 100%.
When computing for a log time, windows just turns rhino into not responding state...
How can i avoid this? What is the correct approach? (pause the process from time to time?)
You probably just need to tell Rhino to process it's message queue every once in a while. Try calling the Redraw function every 30 of so iterations.
You could use Rhino.Geometry Objects instead of rhinoscriptsyntax commands such as AddSurface or AddBoundingBox.
But you would need to add these objects at the end of your generation by running the
scriptcontext.doc.Objects.AddBrep() command for example on each polysurface.
temp = 
for i in range(1000):
for circle in temp:
hope this could help
Calling redraw() does not work, probably because i have EnableRedraw(False) (?).
The creation of each brep is based on the previous ones. Can this be achieved using Rhino.Geometry Objects instead of rhinoscriptsintax?
I guess some tutorials on how to use Rhino Objects instead of rhinoscriptsintax would be useful to me.
Thanks for the replays.
Sure you can use Rhino.Geometry Objects for this. The difference to rhinoscriptsyntax commands is that these objects are only in the memory and not in your doc file, making computation much faster because you dont call the doc first.