Domain percentage


I’m trying to get the value inside a domain using a slider as a percentage of that domain.
I think I should use remap numbers component but I have no clue on how to do it. In fact I do not understant 100% how this component works.
In the definition here attached I created a domain that goes from -0.45 to 0.45, so what I’m trying to do is as instance try to find the 50% of that domain that is 0, or the 25 % should be -22.5.
Any idea on how could I get this ?


domain (5.4 KB)

domain (11.8 KB)

1 Like


you can do it like this…


Default sliders go from 0 to 1 (0% to 100%), which is also the default for ReMap ‘S’ (Source) and ‘T’ (Target) inputs. So typically (not always!) you define a target domain and leave the source alone.

domain (9.6 KB)

P.S. Minor point, I didn’t notice this and obviously it works either way, but more often than not, the ‘A’ input of Construct Domain is the lower bound and ‘B’ is the upper bound, so that as the ‘V’ slider for ReMap goes from 0.0 to 1.0, the result (‘R’) output goes from minimum to maximum.

domain (9.4 KB)


If you want a component check Pufferfish Slide Through Domain component. Also Rhinocommon has a method for that here:
or use components as shown above. You got many good options :grinning:

That is a disingenuous statement @Michael_Pryor. Component count was not the issue here. If it were, @Jakinta’s example can be simplified using expressions of “-x/2” and “x/2” on the Dom inputs, as follows:

domain (5.0 KB)

Care to show us a screen shot of a Pufferfish version with fewer components?

Advocating a plugin (again!) for another trivial piece of code is getting to be a bad habit with you. It is a disservice to those trying to learn Grasshopper, bordering on harassment.

and also if you are just interested in remap math in general check here:

remapping logic is quite interesting

Hi Joseph,

I liked your solution and missed it when I commented, hence my edit, no need to be an ass. Good job. I was advocating the general idea of knowledge. Get over it man, there are many ways to do things. It is not a disservice when the method literally comes from McNeel with Interval.ParameterAt. You just existing in this forum borders on harassment, as many many other users have commented to you.


I’ve had it with you. On ignore.

1 Like