Hello.
Is there an additional Number Slider in the Grasshopper in which the range of values would not be set manually, but would be obtained from the results of the calculations?
well, the need of something like that was felt already 10+ years ago
this is not exactly what you are looking for, but maybe it’s helpful or inspiring
you could also consider to insert some rounding in such a way to get sharper values
Hi inno!
This is an elegant solution, thank you very much.
But I became interested in your link to the dynamic slider.
It would be cool to be able to automatically set to numeric domain for a min/max values in slider.
The thing is that in my example the curve is not static, it will change its size.
I would like to see in the slider the values in millimeters.
I tried to play with the script, but it does not work for me. 10 years have already passed, and code is presented on the site, which may not be supported.
private void RunScript(object x, double y, ref object A)
{
var input = Component.Params.Input[0].Sources[0]; //get the first thing connected to the first input of this component
var slider = input as Grasshopper.Kernel.Special.GH_NumberSlider; //try to cast that thing as a slider
if(slider != null) //if the component was successfully cast as a slider
{
slider.Slider.Minimum = 0;
slider.Slider.Maximum = y;
}
}
I also saw a topic where you participated in the discussion of a similar issue. In one of the examples, the slider receives data, but within a manually set value range.