Grasshopper

algorithmic modeling for Rhino

Hi,

Is there a way of setting the step size of a slider?

For instance if the limits are from 0 to 15 every 3 units, so i get 0,3,6,9,12,15, instead of 0, 1, 2 ...

Thanks

Views: 15795

Replies to This Discussion

Hi Abraham,

Maybe you can use the "evaluate" component:

Attachments:

You can put an expression into a slider to achieve something like this.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Great! Did not know that.

Thank you David.

So simple. Thank you.

I have another one related to sliders. I know that some relatively similar questions were asked before but not quite this issue:

Let's say i have a box that i control it's XYZ dimensions through sliders. Each dimension has a range (for instance the Z is 3, 6, 9). The question is if there is a way to automatize all the ranges in the dimensions loop. As a matter of fact i'm looking for "a loop inside a loop" automatic option.

Hope the question is clear ..

Thanks

Hi David

just wondering if stepped decimals can be implemented. say, If I want the second decimal to be always either 0 or 5.

wow, nice!

not sure why it works, but it does! thanks!

PS: they have to be set to integers, right?

I have also problem with slider. Trying to control window percentage within wall so need value 0.2, 0.4,0.6,0.8. I used expression x*2 but can not find how to set up limit. I could define my starting point Min 0.2 but can not define max as always change to 1.2.

Hi Michal,

the slider seems to adjust its domains too strongly when there's only a single digit. For some reason it demands that there's at least 10 steps between min and max. This is a bug, it should only enforce a single step between min and max (as it does for other digit counts).

There's no way around this for now, you'll have to use two digits if you want the min and max to be closer together than 0.2 and 1.2

--

David Rutten

david@mcneel.com

Poprad, Slovakia

In that case I will not be able to control Galapagos as will have a lot of values...is there any way around that ...?

Hi Michal (also in this forum).

Attached a file with 2 solutions:

1. With the slider. It works fine for me. I don't understand why it isn't for you.

2. With a list of numbers. This works for sure also.

-A.

Attachments:

Excellent thanks...idea with multiple number is great....second example does not work as I do not want 0 and 1.0. .Becasue 0 will crush my scale window function and  1.0  will crush my simulation as window need to be smaller than wall. I need just 0.2, 0.4, 0.6 and 0.8

Good to hear it helped.

As for the slider you can just change the limits to Min=1 and Max=4, so you'll get the values you want (.2, .4, .6, .8). This works for me fine.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service