vJSONConvert2D_3D
Regroups the values of each array element into groups of 1, 2 or 3 values.

vJSONConvert2D_3D takes an array of value lists and cuts each list into groups of the size chosen by Convert To. With X Y Z, a 2D point {x, y} becomes {x, y, 0}.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Convert To: | Dropdown | X | Group size: X (1 value, default), X Y (2 values) or X Y Z (3 values, with the last group padded with 0). |
| Input | DATATYPE | — | Data to process. |
Read the full description
Convert To sets the group size: X is 1, X Y is 2 and X Y Z is 3. Each input element is read from the start in groups of that size, and each group becomes one element of the output. Groups never span two input elements.
With X Y Z, a last group that has fewer than 3 values is filled with 0, so {x, y} becomes {x, y, 0}. With X or X Y, a short last group stays short. A 3D point converted with X Y becomes {x, y} followed by {z}.
The output has one element per group, so its length can be larger than the input length.
Example Connections
- Lift a 2D path into 3D and draw it
- Convert grid points
vJSONFromPolyline.Output -> vJSONConvert2D_3D.ArrayA
vJSONConvert2D_3D.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input
vJSONPointsOnGrid.Output -> vJSONConvert2D_3D.ArrayA
vJSONConvert2D_3D.Output -> vJSONTranslate.Input