This article explains how to use the Construct Domain to create a numeric range.


On the Grasshopper, it is displayed as either an icon or text.
Create a numeric range

The basic Construct Domain usage is to be able to create a range of numbers.
In this case, 5 is input to the Construct Domain(A) and 20 to the Construct Domain(B).
The resulting output is 5 To 20.
This would mean a range from 5 to 20.
Example Usage of the Created Domain
Let’s take a look at an example of using a range created with Construct Domain.
Example of using Range component

Use this Range component at first.

Connect the numeric range created by the Construct Domain to the Range(D).
Then, enter a numerical value for how many more divisions of the range you wish to make in the Range(N).
In this case, we entered 3.

Looking at the output results, four numbers were extracted: 5, 10, 15, and 20.
This is because we extracted the numbers that create the three ranges 5~10, 10~15, and 15~20.
Example of Random component usage

Next, use the Random component here.
This component is used to generate random numbers.

Connect the range created by Construct Domain to the the Random(R).
Then, input the number of random numbers you wish to create to the Random(N).
Then five random numbers in the range of 5 to 20 are output.
Move the object by the number in the range.

We would like to move an object using the numerical values of the range we have created.
In this case, we will use Move and Unit Z to move the cube in the direction of the Z axis.

Thus, only 15 moved as a result in the Z-axis direction.
This is because it moved by the Construct Domain range of 20-5=15.
Thus, Construct Domain can also be used as a subtraction.
Decompose and extract the first and last numbers of a range

The Deconstruct Domain component can be used to deconstruct a range and extract the first and last numbers in the range.

We were able to retrieve a value of 5, the beginning, from the Deconstruct Domain(S) and a value of 20, the end, from the Deconstruct Domain(E).
List of Grasshopper articles using the Construct Domain component↓
Comment