# List Sorting

**URL:** <https://discourse.mcneel.com/t/list-sorting/83962>\
**Category:** Grasshopper\
**Created:** [May 28, 2019, 6:40pm UTC](https://discourse.mcneel.com/t/list-sorting/83962 "2019-05-28T18:40:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandroskkoufou45](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandroskkoufou45/32/359953_2.png) [@alexandroskkoufou45](https://discourse.mcneel.com/u/alexandroskkoufou45)\
**Post date:** [May 28, 2019, 6:40pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/1 "2019-05-28T18:40:12Z")

</div>

Hello everyone,

As you can see I have a very simple definition and I am trying to connect the points as the attached image. I am trying to make 4 lines connecting each side of points with an interpolate curve in order to create a vault.  
I can not figure how to manipulate the list in order to create those lines.

Thank you for your time.

Alexandros

 ![Capture](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/9/c/9c4366e4a822f9f52307334393549636a7fa2d10.jpeg) [Vault.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/f/5/f55c943012bc6e72772f863db855aa1f2415a580.gh) (8.1 KB)

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [May 28, 2019, 7:08pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/2 "2019-05-28T19:08:11Z")

</div>

Like this?

 ![Canvas%20at%2004%3B07%3B06](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/2/a/2a9402f9cddd807d490ccc039436c0c44c79e57c.png)  
[Vault\_re.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/9/5/95f6c364e0a23234d8da1e1dead137cc7d49673d.gh) (10.4 KB)

---

<div class="post-metadata">

**Author:** ![alexandroskkoufou45](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandroskkoufou45/32/359953_2.png) [@alexandroskkoufou45](https://discourse.mcneel.com/u/alexandroskkoufou45)\
**Post date:** [May 28, 2019, 8:40pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/3 "2019-05-28T20:40:55Z")

</div>

Hello Kim,

Yes this is what I wanted.  
Thank you very much.

Alexandros

---

<div class="post-metadata">

**Author:** ![alexandroskkoufou45](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandroskkoufou45/32/359953_2.png) [@alexandroskkoufou45](https://discourse.mcneel.com/u/alexandroskkoufou45)\
**Post date:** [June 6, 2019, 7:56pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/4 "2019-06-06T19:56:03Z")

</div>

Hello Kim,

I have another issue with list sorting. Can you please have a look at this?  
I am trying to create interpolate curves from all the mesh vertices and the middle and top points of the object as shown in the image but I don’t manage to do the list work.  
I would appreciate if you had a look.

Alexandros

 ![1](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/8/78f076cd21204457d436b29322156acf7389dd65.jpeg) [droplet.gh (14.8 KB)](https://discourse.mcneel.com/uploads/short-url/4qaEIoRWSlmlnHhE1KnaB1OLu4q.gh)

---

<div class="post-metadata">

**Author:** ![Adam\_M](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/adam_m/32/769331_2.png) [@Adam\_M](https://discourse.mcneel.com/u/Adam_M)\
**Post date:** [June 6, 2019, 8:18pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/5 "2019-06-06T20:18:45Z")

</div>

I’m not really sure if this is what you are looking for.

[droplet\_V2.gh (17.0 KB)](https://discourse.mcneel.com/uploads/short-url/zTBy21Ac94eMzre9bp8sGtnRrLl.gh)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/7/e796c1b1062f70c7ef588aed7903b2ad6bd034f8.png)

---

<div class="post-metadata">

**Author:** ![alexandroskkoufou45](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandroskkoufou45/32/359953_2.png) [@alexandroskkoufou45](https://discourse.mcneel.com/u/alexandroskkoufou45)\
**Post date:** [June 6, 2019, 8:33pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/6 "2019-06-06T20:33:50Z")

</div>

Hello Adam,

This is exactly what I am looking for but do you know why I get this result and not the same interpolate curves as you have?  
I get straight lines.

 ![2](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/f/e/fe52025c1da71dd051f3b834376a82359d342c02.jpeg)

---

<div class="post-metadata">

**Author:** ![Adam\_M](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/adam_m/32/769331_2.png) [@Adam\_M](https://discourse.mcneel.com/u/Adam_M)\
**Post date:** [June 7, 2019, 6:10am UTC](https://discourse.mcneel.com/t/list-sorting/83962/7 "2019-06-07T06:10:44Z")

</div>

Using the definitions I uploaded?

The key, as is often the case in GH, is matching the data. You just need to make sure each point you want to interpolate through is in the same list within the same data branch/path.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/d/7d81c21ccd37d2684e88b7a1252141e5c82a0480.png)

---

<div class="post-metadata">

**Author:** ![alexandroskkoufou45](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexandroskkoufou45/32/359953_2.png) [@alexandroskkoufou45](https://discourse.mcneel.com/u/alexandroskkoufou45)\
**Post date:** [June 7, 2019, 3:23pm UTC](https://discourse.mcneel.com/t/list-sorting/83962/8 "2019-06-07T15:23:05Z")

</div>

Thank you Adam.

I will try to make this work.
