Simple question: Reordering / Referencing Lists


(Lowell Clarke) #1

Hello,

Really simple question here, I’m getting back into GH after a short break and can’t remember how to reorder / reference one list against another.

As in the picture, I have reordered my “points unordered” list to match up to the curve they are nearest to. Each of these points shared an index with a correlating list of values in “Points Values Unordered”. How do I now reorder that list so that I can then apply each value to its nearest curve?

Any help / advice would be very much appreciated.

image

LC Upload.gh (3.5 MB)


(Lowell Clarke) #2

Looking closer I realise I’ve completely misunderstood what the nearest point is doing here.

I’ve taken a step back and realised what Im trying to do is harder than I thought.

How can I re-order my points and values to correlate with the nearest line / contour?
[At present the wrong contours are being moved]

image

image

Simple.gh (3.5 MB)


#3

Is this what you are after?


LC Upload_re.gh (3.5 MB)


(Lowell Clarke) #4

Hi Kim,

Thanks very much for that, it seems to have done the job at this scale. Now that I have to scale this up to nearly 2000 lines and contours I’ve plugged it in and left it running. As it has to reference each point against each line to find the closest, I imagine it will take quite a while.

If I just let it do its thing, is waiting the best option here or is there a better way to deal with large datasets?


#5

If you don’t mind to use plugins, Peacock has a user object namedClosest Geometry and probably it will take less time than my previous posting, but not sure it can save how much time for your case…


If you want much faster solution, then you’ll probably need C# scripting…