Hi everyone,
right now I’m learning to script C# for Grasshopper and try to customize a Kangaroo solver,
which will stop after certain iterations.
LimitStep.gh (55.9 KB)
It is working but the solver output the result directly, can someone please tell me if it is possible to customize Kangaroosolver also with the Bouncy effect?
(like the bouncy solver but will stop at certain Iteration)
Thanks
Hi Gottfried,
Do you mean to output the intermediate results, not just the final one?
or specifically the bouncy effect (momentum and more oscillation)?
Hi Daniel,
Thanks for the reply,
I mean to output the intermediate result during the calculation, so it will be visually dynamic.
every time I used “do while” loop it will only output the final result.
I was thinking in order to do so, do I have to add a timer?
LimitStepBouncy.gh (54.9 KB)
Here’s one way to make it output intermediate results.
This one still uses a timer, which will keep running even when the solver is done. With a compiled component you could avoid the need for this, and make it stop when done by overriding AfterSolveInstance - I think there was also a way to do this within the GH script components, but can’t recall right now exactly how this was done.
1 Like
I remembered now how this is done without the timer - it’s just a question of adding in an ExpireSolution like this
LimitStepBouncy2.gh (51.5 KB)
2 Likes
Thanks, Daniel! It working Great!
It really helps a lot!
By the way, could you tell me how can I add a timer in a compiled component?
I didn’t find any example on GitHub.