I have feeling that this might be a really easy question for some people, but I couldn't figure out. X(
stream 1
(a1, b1, c1)
(a2, b2, c2)
(a3, b3, c3)
....
stream 2
(d1)
(d2)
(d3)
...
I want to get this target list:
(a1, b1, c1, d1)
(a2, b2, c2, d2)
(a3, b3, c3, d3)
....
What I want to do is injecting one more value (arbitrary angle in my case) to each point before I cull many of them - so that each point brings its angle data along.
If the tree layout of the ABC and the D data is identical, then just merging the two streams (in the correct order) will append all items in D to the end of all lists in ABC.
But you will need to make sure that the paths for {a1, b1, c1} and {d1} are identical.
You can use a ParamViewer to see these paths, and use a Path Mapper to adjust them.
In GH (and .NET) points are not simply an array of 3 numbers like in Rhinoscript, so you can't just add a 4th value in there.
Do something like this: Connect a graft component after the point output, connect a graft component after second flattened list, decompose the points in XYZ, connect these 3 outputs + the grafted second list to a merge component with 4 inputs. You should end up with 5 branches of 4 elements each.
You could use an expression with String formatting functions to create "1,1,1,100" (you'll need two expression inputs, a point and a number, let's call them P and N). The formatting string is:
Format("{0},{1},{2},{3}", P.x, P.y, P.z, N)
Then you can use the new StringSplit component in 0.7 to break the string apart at the commas...