19. September 2023

Conditional creation of Arrays

In many cases only specific values of an iteration should be added to an array. A simple solution is the use of the Append Elements node, which allows to control the number of added elements.

A condition usually delivers a boolean value and is either true or false. True and false are equivalent to and can be auto converted to 1 (True) and 0 (False), giving us the option to directly use the outcome of a comparison or similar to set the number of elements added by an Append Elements node.

Example-Array-Conditional-Creation.c4d