algorithmic modeling for Rhino
Basically I have a lot of number sliders that controls something.
I would like to control each of the number sliders with the panel tool.
Basically like a master palette, I can change the information in the panel and it will correspond to the slider which will then do its job.
This is very useful as I can have a lot of iterations saved in different panels, which I can then execute easily by switching them, instead of changing each and every sliders! imagine if i have 100 different sliders and 100 different iterations?
I have thought of a way, which is by having a multi line panel and list-iteming each of them into their respective input, but this is too cumbersome, and it looses the convenience of the number slider..
Please view attachment for a clearer picture, its actually pretty simple. I have checked online high and low, all i got was the remote control panel, but that does not give me the function of inputting data like how the conventional panel does.
Anyone out there who can send me the light!?
Tags:
Easily doable but only via code.
You can control any slider (usually accessing it via his NickName and assign any min/max/whatever value). Now ... if the "assignment" derives from a "pool of presets" (some datatree where branches correspond to sliders and values correspond to "preset" sets ) you can cut the mustard quite effectively.
But the bad news are ... er ... the code part of the equation
Do you speak C#?
Hi peter,
Thanks a lot for the help! I am good with python with rhino, but not C unfortunately....
Do you know any link that is useful for me?
Ah! you are familiar with code then.
I'll prepare a small demo (but the issue with P is that there's no P>C# translators - from what I know, anyway. Hey: even for C++<>C# matters there's only one [working] translator around ...).
Link? no I'm afraid (to be honest: I don't follow P related threads since I did my choice towards C# long time ago). But in the code related GH discussions maybe someone did that using P.
BTW: a viable workaround is what David proposes ... but IF this kind of control is part of some code driven definition (for instance: if things arrive in some state > affect these sliders etc etc - very common approach in classic engineering matters like designing a truss where "constrains" change continuously) then control via code is the only solution.
You could save states (Solution menu) with different values for each slider.
But what you want is a panel which has 6 numbers, and when you 'trigger' that panel those 6 values are set as the positions for the 6 sliders? Or is it a one-panel-one-slider sort of set up you're after?
Say I'm designing a shoe with grasshopper, and there are 150 sliders that controls the design of the shoe. I want to have 10 different iterations of the shoes, without losing its sliding capability.
The idea is to have 10 different panels that have different configurations of the 150 sliders. So in a way i can save my iterations by having different panels instead of going into each and every one of them to change.
Technically speaking, its the first option you suggest, a panel that will set the position of the 6 (or more) sliders. Also, when I change the slider, it will update the panel that is plugged in before it.
Any idea?
Thank you very much!!!
Well, except for updating the panel (which is difficult to do as it results in cyclical logic), Solution States is exactly what you're describing.
Is it just too difficult to select a saved state? What could I do to improve them to they become more useful to you?
Thank you David for being so helpful, its a blessing for the GH community to have people like you around.
I understand saved state can kinda do what I want to achieve, but it becomes cumbersome when I update and add new components.
Is it all possible to have a number slider that can take an input from a panel?
- So when you plug a panel into it, it can no longer slide (as like you mention it will result in a cyclical logic)
- A toggle button, where you can turn off the input from the panel, which will enable you to slide again. (when you turn it back on, it will go back to whatever input number it was assigned from the panel - makes sense)
- (if you have time and want to push it a bit further) An input number, so you can extract the position of information from the multi-line list. I.e, if you put in 3, it will take the 4th one in the list from the panel. (I understand this can be done with list item, but when you have a lot of sliders, it will become a mess)
I know its too much to ask for, but if you can find a way to have a slider that can take an input from a panel, I am happy!
Thank you so much!
I believe this describes the save state option
cheers
alex
Hi Naruto,
Thank you for your reply, this is kinda what I want to get to, the problem is that this python component takes into account all the sliders in the canvas?
How can I specify only a set of sliders? Is there a way to control, the value from the panel to a specific slider? It seems like it goes in ascending order(whichever slider that is created next will go down the list)
I.e : the 2nd in the list 0.34, corresponds to number slider 'dda' instead of number slider '23'?
Thank you!!
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