vScriptValIterator
Keeps every Nth point of an array and skips the points in between.

vScriptValIterator takes an array of XYZ points and outputs points 1, 1 + Step, 1 + 2 * Step and so on. Step is the only control, and 1 keeps every point.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Step - (skip x points) | Integer | 1 | Take every Nth point, so Step - 1 points are skipped between kept ones. Minimum 1, slider 1 to 10, default 1. |
| Input | DATATYPE | — | Data to process. |
Read the full description
The node walks the input from the first element in steps of Step and copies the first three values of each element it lands on. With Step 2 on ten points it keeps points 1, 3, 5, 7 and 9. With Step 3 it keeps points 1, 4, 7 and 10.
Step is an integer from 1, slider 1 to 10, default 1. At 1 every point is copied. Elements that are not lists with at least three values are dropped, so an array of plain numbers gives an empty output.
Nothing is repeated or looped. The output has at most the input length divided by Step, rounded up, because dropped elements shorten it further.
Example Connections
- Thin out a grid and draw it
- Unpack, thin and pack again
vScriptValPointsOnGrid.Output -> vScriptValIterator.ArrayA
vScriptValIterator.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input
vScriptValUnPacker.OutputArray -> vScriptValIterator.ArrayA
vScriptValIterator.Output -> vScriptValPacker.ArrayA