Sorting mirrored items

Hi there, I am new to Grasshopper and I have come across an issue where I am trying to sort mirrored points. (index number of the point) I am trying to achieve a left-to-right and top-to-bottom order for them. When I use the Sort List component, I can achieve only 1 row of points to follow this order but when I increase the row of mirrored points, it starts to become messy. The other option that I tried (both options are from the forum) was trying to use the Shift List, but after the first row of points, it became messy. My final goal is to create a textured surface that will flow along a curve and the beginning of the surface and the end of the surface connect seamlessly. (I’m not sure if I used the right approach) At the moment when I replace (Replace Items component) the final list last couple of rows with the mirrored point and I try to create a surface, it starts twisting the surface because of the random order.



welcome to the forum :slight_smile:

depending on the data structure your points have there might be several ways to do that, so it’s very much adviced to internalize data and upload your GH file because it’s pretty difficult to guess it from screenshots alone

please post a version of the file where you have several rows and it becomes messy

if you have an already sorted grid of points (regardless of them being mirrored) usually it might involve the use of the Flip Matrix component (to swap between horizontal/vertical arrays) and right click on the Parameter and Reverse (to reverse their order)

Thank you for your reply! I internalized the data. It works with only 1 mirrored row, but I can’t get to work with multiple rows. (I want to control when the transition starts between the end and the beginning of the surface)
sorting issue.gh (137.2 KB)

I would use groups to make life a bit easier:

sorting issue_Re.gh (139.1 KB)

Wow! I have integrated it in the big picture and it works perfectly! I went through the components, so I can understand it, and I have learnt something new! Thank your very much for your help!

My last question is, how to merge the beginning and the end of the surface after flow along component so the seam disappears? (I have tried Brep Join and Merge Faces but without success)

you can’t completely get rid of it :slight_smile:
a nurbs surface is like a squared piece of elastic fabric that you can stretch/compress infinitely up to a point where the seams are just points (for instance in a sphere) but they still exist

you might want to move it in a location where it’s less noticeable, or hide the curve that enfatizes it, but it’s still there :slight_smile:

for instance, the seam of the target curve you are using is now here:

you can slide it along the circle up to here?

sorting issue_Re_Re.gh (140.4 KB)

Thank you!