Create Surface From Points using two sets of data

Hi Everyone,

I’m doing some Grasshopper exercises trying to learn more how to work with data trees and lists. I have a (hopefully) simple question. I’m trying to create a surface from a set of points. I split the set of points into 2 data sets so I can have separate control over the last 2 rows of points. When I try to merge these points back together and use the “Surface from points” component the surface looks pretty weird, I’m assuming it’s because of how the data is being read.

Here is an example of what I am more or less trying to achieve (how it looks when I don’t try to separate the data)

Here is a snip of the section of my code dealing with this area


Here is the result I am currently getting

The patch command kind of works? But it offsets the overall size which I do not want. I plan on lofting it to the original curve with the new surface. Also - I would like to learn how to figure out a problem like this while still using the “Surface from points” component

Any help is appreciated!
Surface From Points.gh (12.5 KB)

You can’t blindly flatten data trees without understanding them :bangbang:

Divide Surface gives you six columns of six points each, bottom to top. Split List divides each branch into two points from ‘A’ (six branches of two points each) and four points from ‘B’ (six branches of four points each). Which you immediately flatten :interrobang:

So the data tree is destroyed, leaving a list of 12 points from ‘A’ and another list of 24 points from ‘B’. Then you move these points randomly in the Y direction and want to combine them in order as they originally were…

To do that, you must partition the list from ‘A’ by two (six branches of two points each) and partition the list from ‘B’ by four (six branches of four points each). Then Merge them, taking care to connect tree ‘A’ first, then tree ‘B’ (because you swapped them earlier :interrobang:).


Surface From Points_2024Oct21a.gh (25.3 KB)

A pointless mess - learn data trees :bangbang: Hidden wires don’t help.