[Grasshopper] How to use Integer to set integers

[Grasshopper] How to use Integer to set integers Grasshopper component EN

This article explains how to use Integer to set integers.

Integer1
Integer2

On the Grasshopper, it is represented by either of the two above.


↑Youtube Channel

Setting Integers

Integer can be used to set integers.

Setting Integers

Input integer numbers to the left terminal.

The integer numbers are then set in Integer.

negative numbers

Since it is an integer, negative numbers can also be set.

Rounding Decimals to Integers

Decimals can be rounded to integers by connecting them to Integer.

Rounding Decimals to Integers

Entering a decimal number as an integer will round it to the nearest whole number, as shown in the image above.

However, since everything is rounded to an integer, it is not possible to specify a decimal place to round to.

If you want to round to a specified decimal place, use the Round function of Expression to round.

Converting Boolean values True and False to numeric values

Boolean values True and False can also be converted to numeric values.

Converting Boolean values True and False to numeric values

Connect True and False to Integer like this.

Then True is converted to 1 and False is converted to 0.

Specifying an Integer Directly to a Component

You can also specify an integer directly in a component.

Set Integer

To specify an integer directly, right-click on Integer and select Set Integer.

Then enter an integer and click Commit changes.

Set Multiple Integers

To directly specify multiple integers, right-click on the left terminal and select Set Multiple Integers.

Then enter multiple integers and click Commit changes.

List of Grasshopper articles using Integer component↓

Comment

Translate »