I created a script in grasshopper using Kangaroo but it doesnt load

So, basically what I did is I created 4-5 scripts in the canvas, the first four being very light nothing that major. I even disabled those while going for the final script, which is a little longer than others. but once it was completed my canvas got sluggish and the software stopped responding.
The PC is working fine, I built quite a heavy PC but I fail to understand why is it not working properly.

PC specs - Amd Ryzen 7 5800X, GPU - Msi Radeon Rx6800 Gaming x Trio 16 Gb
SSD - 1Tb Samsung 970 Evo PLus NVME, HDD - 2TB Seagate Barracuda 7200 RPM
RAm- G.Skill 16GB 3600 MHZ CL19
and I am using Asus Rog Strix B550 F gaming PLus Motherboard

I’ll attach the script
The program stops responding and keeps calculating but doesn’t provide me with any result it keeps calculating and its an endless cycle
Day 5.gh (58.3 KB)

Nice PC specs! :star_struck:

Everything is fine, it’s just you shouldn’t execute that heavy calculation while your kangaroo simulation is running.
Note: on old kangaroo to stop the simulation you mainly need to pause the timer, switching the “On” input to false wouldn’t be enough because the timer would still make the component and all its subsequent recipients refresh.
Note2: you should really start using kangaroo2, no need for tricky timer, overall it is much better.

Look here:

You set the timer at 20ms intervals, but the components after kangaroo require a total of more than 16 seconds (on my old 1800X :nauseated_face:)
It means that every time kangaroo finish its iteration, it have to wait for 16secs before calculating the next one.
It’s not freezed/crashed… it is doing what you asked him, and you are not able to stop it.
A 16 million vertexes mesh is created at every kangaroo iteration!
A simulation that normally might reach threshold in some seconds would take half an hour.

Solution: disable components after kangaroo while the simulation is running. After you are sure to have stopped properly the simulation (stop the timer!), re-enable them.

2021-08-01 11_49_48-Grasshopper - Day 5_
you were applying “Load” force to all vertexes, even to the anchored ones.
Simply use “ClothedPts” to avoid that.
… this is only a small problem by the way…

Hey! Thanks a lot for responding, I just started learning Grasshopper. So, I am actually attending workshops and there they taught both versions so some scripts are using Kangaroo while a few with Kangaroo 2. The one creating the problem is done with Kangaroo 2.

Coming to the solution - So basically even if I set the script to False, the timer will update the script every interval? is it what you meant?

Also, in order to run the script and not lose it, so I just need to keep it running until it responds? because my rhino stops responding and lags a lot even if I try to maximize or minimize it.

If that’s what you are saying will it run calculations if I just minimize it and keep doing my work in some other software or does it pause calculations when minimized?

Because currently, I am unable to do anything since it keeps calculating.

Sorry, my bad, i didn’t even check. I’ve seen the timer and assumed it was kangaroo 1.
Kangaroo 2 solvers do not need timers at all.
Just remove them and use the boolean toggle on the “On” input.

1 Like

I cleaned it a bit, try it now
Day 5 v2.gh (23.3 KB)

Also see What is Kangaroo Show component for?

1 Like

I’ll try it. Also, The reason I used show component was because the instructor at the workshop said that without putting it I wont be able to see the mesh output

I am not sure what entwine does. I’ll read about it.

And just out of curiosity, What supercomputer are you using :sweat_smile: I told my specs and this script didn’t work in it. Either you did some magic or you have some super computer I am curious how exactly did you cleaned it

He is right.

The same as yours, ryzen, but 3 years older (obsolet-er).

It is just…

See details on my first post ^

My last attached .gh automatically avoid the problem thanks to a stream gate.

1 Like

It ran without any problem. Just that some of the geometries are missing the extrusions for the poles/columns and base structure. But I understood that I need to keep the load on Software and calculations in account while scripting. Thank you so much!

Oh… not really.
I just removed all the geometries that were unrelated to kangaroo, just to have a cleaner view of the situation.

Any geometry that is created on grasshopper but that is no recipient/“descendant” of kangaroo, does not slow down kangaroo at all.

1 Like

Well Some geometries are not there other than the ones related to the simulation but that’s no big deal. I am quite happy that I got to learn things.