# Point list in sequence

**URL:** <https://forum.dynamobim.com/t/point-list-in-sequence/16240>\
**Category:** Uncategorized\
**Created:** [November 5, 2017, 3:52pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240 "2017-11-05T15:52:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![thethtarzaw](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@thethtarzaw](https://forum.dynamobim.com/u/thethtarzaw)\
**Post date:** [November 5, 2017, 3:52pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/1 "2017-11-05T15:52:00Z")

</div>

Hi,  
Could anyone advise how to make the points in sequence so that closed curve can be drawn.?  
Thank you so much.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/b/6b7c65007cc4476d8fed677d82d277ba6712aa5d.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 5, 2017, 4:13pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/2 "2017-11-05T16:13:34Z")

</div>

Hi @thethtarzaw

Could you show us preview for `"PolyCurve.ByPoints"` node.

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [November 6, 2017, 7:07am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/3 "2017-11-06T07:07:41Z")

</div>

> [@thethtarzaw](#):
>
> Could anyone advise how to make the points in sequence so that closed curve can be drawn.?

There isn’t necessarily a standard way to do this. depends on specific conditions.

Looking at your image, seems like you have two rows/columns of points.  
You could try sorting them by their X coordinate values (round off the value to ignore minor variations) and then the Y coordinates (or vice versa)

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [November 6, 2017, 8:17am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/4 "2017-11-06T08:17:51Z")

</div>

There have been several discussions on the forum regarding sorting of points based on location.

Have a look and have a go. 😉 If you do crack it, please remember to post your solution to aid others.

> [@Clean Polycurve](https://forum.dynamobim.com/t/clean-polycurve/16166):
>
> I am doing something wrong but I cannot figure out what it is for the life of me. I think I have read through every post on this forum regarding simplifying a Polycurve. The best method I have seen is to use Springs.CurveLoop.Simplify but I cannot get it to work. I am pulling the Perimeter Curves from a surface and trying to clean up the lines so that there is one curve per edge. The revit file was too big but if you just draw a curtain wall in a new project and it will find it. [C…](https://forum.dynamobim.com/uploads/short-url/iS5GPQupw37wbvGqerCOK4EaiZ9.dyn)

> [@Sequential Numbering of Revit Elements](https://forum.dynamobim.com/t/sequential-numbering-of-revit-elements/13413):
>
> Hi, the task is to assign sequential numbers to a number of fire dampers, starting from the upper left damper. Some dampers are located one below other. Is there a method to do this without exporting coordinates to excel , sorting f.e. by X coordinate and assigning numbers manually? Or If I want to number them clockwise, could you suggest any algorithm etc? Thanks. [000000.pdf](https://forum.dynamobim.com/uploads/short-url/7zhBRIUiIMBbHRs6ngB1mf19vJx.pdf) (40.7 KB)

> [@Numbering Doors Along PolyCurve](https://forum.dynamobim.com/t/numbering-doors-along-polycurve/15822):
>
> In reference to [my door numbering script here](https://forum.dynamobim.com/t/door-numbering-clockwise-by-room-number-with-room-entry-door-override/15813), I’m looking for a way to pull the clockwise locations of doors along the room’s perimeter polycurve instead of just radial from the center location of the room itself. My other script should work for most instances, but the issue is when there are odd shaped rooms like this where radial numbering breaks: I currently have the vector from room center to the room’s entry door (or 12 o’clock from center) to begin door numbering. I al…

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [November 7, 2017, 1:28am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/5 "2017-11-07T01:28:35Z")

</div>

Ok, feeling generous. 😀  
Should solve your problem @thethtarzaw

Part of an upcoming package.

Node Description:  
Takes a list of unsorted points and orders them (clockwise/anti-clockwise around a centroid) to create a Perimeter. Useful for Polycurves and Surfaces.

![Sort points as Perimeter](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/0/a/0a02d850d8be3aacac2e6b82fae63a7c7253c354.gif)

[Sastrugi - Sort Points as Perimeter.dyf](https://forum.dynamobim.com/uploads/short-url/ep8zpmoRincshQ7K69VQnZhPz8g.dyf) (10.5 KB)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [November 7, 2017, 9:02am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/6 "2017-11-07T09:02:25Z")

</div>

@thethtarzaw  
It would be a good exercise to try to solve your own issue with some support from the forum, especially since there are already other related discussions such as this one:

> [@Number Sequence By Curve](https://forum.dynamobim.com/t/number-sequence-by-curve/14469/9):
>
> Here’s one option that might work.

@Ewan_Opie  
I can not wait to see information about your upcoming package posted in the Share category 🙂

---

<div class="post-metadata">

**Author:** ![thethtarzaw](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@thethtarzaw](https://forum.dynamobim.com/u/thethtarzaw)\
**Post date:** [November 7, 2017, 2:39pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/7 "2017-11-07T14:39:56Z")

</div>

@Ewan_Opie  
It’s cool!.  
Thank you for the node and it comes in handy.  
👍  
Awaiting your full package…

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/4/f4edaffb2ed85788030f1101d8cf5634c17ccb79.png)

---

<div class="post-metadata">

**Author:** ![thethtarzaw](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@thethtarzaw](https://forum.dynamobim.com/u/thethtarzaw)\
**Post date:** [November 7, 2017, 2:42pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/8 "2017-11-07T14:42:21Z")

</div>

@Yna_Db Thanks for sharing.👍  
I will take note on this.

---

<div class="post-metadata">

**Author:** ![PiotrS](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@PiotrS](https://forum.dynamobim.com/u/PiotrS)\
**Post date:** [January 7, 2021, 8:04pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/9 "2021-01-07T20:04:19Z")

</div>

Hi,  
I have similar problem, little bit more complicated. I’m trying to number points on edges of non-rectangular contour. Main task is to get red lines - the spaces between walls and yellow lines - upper walls edges. Both types will be changed to beams. So, I figured out, that it is possible to build sequence of lines by all these points (organised) on edges and then compare list of lines to another list that contains lines from walls.  
In simpe cases, clockwise order done by angle between center and n-point will work, but if the contour is irregular, some point are in the wrong order.

Have You got any idea how to fix these places? Or, maybe, change whole method…?

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/727934f728e69a272c79b4275f3392344970e9b7.jpeg) ![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/d/4de515efe37db0b5acea15afa1cc7bf5fa0722fb.jpeg) ![3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/9/f9be56278b02966eb7b5561afc805b9bfde860d6.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [January 9, 2021, 12:58am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/10 "2021-01-09T00:58:28Z")

</div>

It looks like you could just make a single poly curve from all the points that you have then split it by the points. You would then need to check what lines are over a wall. Maybe just grab the mid-point move it down a bit and check to see if it’s in a walls bounding box.

---

<div class="post-metadata">

**Author:** ![PiotrS](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@PiotrS](https://forum.dynamobim.com/u/PiotrS)\
**Post date:** [January 11, 2021, 8:07am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/11 "2021-01-11T08:07:04Z")

</div>

Hi @Steven,  
It was my first idea. Polycurve seems to be a solution but it’s not if points are not in proper order. After exlploding it (polycurve to curves or geometry explode) I get curves with wrong length.  
These polycurves looks the same, but sequence of points alters how it’s build.

 ![mspaint_2021-01-11_08-58-59](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/1/a1356d237cf12cb369f472dc5890768b69c90d7e.png) ![mspaint_2021-01-11_08-59-43](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/3/73724224fd74b98fc0af2dc087a8ccbb972aedf2.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [January 11, 2021, 6:23pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/12 "2021-01-11T18:23:26Z")

</div>

Take a look at the links Ewan posted above. One of them is mine and I address this problem.

Edit:  
You can also look at creating a surface from the points and then grabbing the perimeter curve.

---

<div class="post-metadata">

**Author:** ![PiotrS](https://avatars.discourse-cdn.com/v4/letter/p/ee59a6/32.png) [@PiotrS](https://forum.dynamobim.com/u/PiotrS)\
**Post date:** [January 15, 2021, 7:59am UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/13 "2021-01-15T07:59:20Z")

</div>

Hi @Steven ,  
I read Your posts.

> [@Clean Polycurve](https://forum.dynamobim.com/t/clean-polycurve/16166/3):
>
> Ewan, Thanks for the help. Lunchbox has a node Points.SortPointsAlongCurve that work perfectly for me.I then did some vector magic to clean the points within the line. I created vectors from point to point then shifted the list by one and checked to see if the vectors were parallel. Vectors at corners are not.

Node _Points.SortPointsAlongCurve_ from Lunchbox is no longer available.

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/2/e28519c776f2bdbdecf663f373cfc4caf21fa76f.png)

" \*\* Note that we have discontinued the Dynamo versions of this tool. Current and future versions of LunchBox are built for Grasshopper. [The source code for the Dynamo version can be found here under the GNU license.](https://bitbucket.org/provingground-io/lunchbox-for-dynamo)\*"

Can You copy-paste python script for that or send \*.dyf file?

@Edit:  
Is it possible to get surface “inside” area using points only? Surface by curves depends proper sequence too.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/c/bcddea2ab37c7dd7c6eb700a9a1d34e6c204427c.png)

@Edit2:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/98e6aef25452b76b4585d34e1fe851fcbbba1564.png)  
Maybe I could add another condition - sort by length. Script will check not only vector’s angle from points to center but moreover their lenght. If vector v.n+1 wouldn’t fit to v.n and v.n+2 sequence, it would be pushed to another list and somehow added in the next step.

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [June 4, 2021, 6:01pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/14 "2021-06-04T18:01:29Z")

</div>

Sorry pressed for time so need to keep this short.  
[https://dictionary.dynamobim.com/#/Geometry/Surface/Create/ByPerimeterPoints](https://dictionary.dynamobim.com/#/Geometry/Surface/Create/ByPerimeterPoints)

You should also still be able to download the old lunchbox package at least last I checked.

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [February 13, 2022, 4:29pm UTC](https://forum.dynamobim.com/t/point-list-in-sequence/16240/15 "2022-02-13T16:29:19Z")

</div>

> [@Steven](#):
>
> You should also still be able to download the old lunchbox package at least last I checked.

Its nodes do not even appear in Revit 2022 Dynamo’s Library when installed. New thread at:

> [@The Elusive Points.SortPointsAlongCurve?](https://forum.dynamobim.com/t/the-elusive-points-sortpointsalongcurve/73301):
>
> Points.SortPointsAlongCurve has gone missing in Revit 2022 Dynamo. It was from LunchBox for Dynamo. Seems there was an installer, now not available. Its nodes do not even appear in Dynamo’s Library. There is no DYF node by that name in its folder from circa 2018. Nor do I see it in its [repository](https://bitbucket.org/provingground-io/lunchbox-for-dynamo/src/master/). Was is in a DLL or something? Is there a way to get it, or what is a workaround?

I’m looking for a replacement.
