Fly_ID and slider Expression

Hi,
Using the Fly_ID component i’ve noticed that when a connected slider has and expression in it, the value taken is not what the slider shows but some kind of rounded one. Like so:


For now I’m “solving” it writing the values in a panel instead of using the slider. But I guess this is not the desired best option.

Bringing this just in case you are not aware.

Thanks,
-A.

1 Like

Hi @ayezioro,

Sorry for the late reply.
I tried to recreate your issue on my side, it seems all working fine.

Am I missing anything?

Hi @mingbo ,
This is weird. Now it is working.
I start t suspect it is related to the sliders in R8. They don’t necessarily comply with the settings. For instance, on some cases you ask for 2 decimal numbers and it gives you 3 instead. It doesn’t round the number, as you do in Fly and instead it gives you more decimals than asked.:


In any case, I’ll take it as working now. Thanks!!
-A.

1 Like

Hi @mingbo ,
Sorry to bring this back again a year after.
The extended issue here is as follows: Say that i want a slider to give me values as 0.2, 0.4, 0.6, … only!
Solving this with a slider I set the range from 1 to N and the expression to x*0.2 … but here is the issue:

  1. Since I want only to have the above values [for instance] I set the the slider accuracy to integer [N]. By doing so the values output in the Fly_ID are 1, 2, 3, …
  2. Setting the slider accuracy to float [R] yields the output values to 0.2, 0.21, 0.22, 0.23, and so on.
  3. Neither of those gives the desired output.
  4. The question is if there i a way to get the values I need using sliders? Should I use as the only option a panel?
    Thanks,
    -A.

Hi @ayezioro,

Thanks for bringing back this issue and I am able to recreate the slider issue on my side, it seems to be a bug in the Fly_ID component.

To address your question, you can also use a value list with 0.2, 0.4, 0.6 in it for now to unblock your workflow.

Please let me know if this makes sense to you.

Best,
Mingbo

Ok, I am able to sort out the issue. It seems a bug in the NumberSlider’ CurrentValue of Grasshopper’s SDK when output value is set to integer [N] with an expression. But I am able to find a walkaround solution for this case.
The new update will be in the next release.

2 Likes

Thanks @mingbo ,
Looking forward the next release.
-A.

@ayezioro, the Rhino plugin v1.57.5 is now available publicly and includes the fix. Let us know how it goes.

1 Like

Hi @mostapha,
Now it is perfect!!
It was quick. Thanks a lot @mingbo and @mostapha ,
-A.

1 Like