algorithmic modeling for Rhino
There are forum threads affording ways to move Grasshopper sliders from custom script components but they all seem to require a full recalculation be triggered for the entire Grasshopper script to have any affect, but that's way too slow if 90% of the GH program is initialization and creation of source geometry to then simply alter a bit or array here and there. When I use Python directly to change output values that I plug into former slider inputs, again no new solution is triggered at all so I'd have to recalculate the entire Grasshopper program which is simply not how Grasshopper normally works. How do I actually emulate a human changing a slider value one slider at a time in a way that makes Grasshopper behave normally so that only downstream flow is affected in an efficient way?
An related example would be if you have several separate programs in a Grasshopper page and you wanted to only change one of them without triggering full recalculation of them all.
At this point it's almost like a Windows mouse scripting utility is needed but if I need to do combinatorial combinations of all possible slider values, that seems quite thorny too unless I set up a pre-arranged array of values that could then simply be incremented "manually" followed by a right click to bake and then typing commands into Rhino to save to a file. UGH. That would be quite difficult to pull off since I need to control file names, but it's what I seem to need.
I'm using Python since it avoids thorny Grasshopper schemes and it allows me to access Rhino to save baked objects files.
Tags:
Looks like expiring the sliders is triggering a chain that expires your Python script, which is directly downstream. When your python is expired, Grasshopper starts your Python all over again. Your python then expires the sliders... repeat ad infinitum. Try separating your mesh script and your looping script into two separate python components.
Have you looked into the looping component written by Rutten? What this does is wait for calculation to finish and then adjust a slider. This does not result in a full recalculation of the whole canvas, but only expires components downstream of the sliders - as if a human had changed them.
I have written more about them here: http://james-ramsden.com/looping-through-the-grasshopper-canvas/
He has solved the problem of getting all combinatorial values of the sliders. The Lunchbox plugin contains a 'bake' component and a 'save' component so you can automate these as part of your workflow. For generating filenames, I tend to make unique file names using the sliders with 'concatenate'.
I use this method frequently and it works very well for me - I reckon you should give it a try.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by