# Sort points for tag line

**URL:** <https://forum.dynamobim.com/t/sort-points-for-tag-line/100226>\
**Category:** Uncategorized\
**Created:** [April 19, 2024, 4:19am UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226 "2024-04-19T04:19:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 19, 2024, 4:19am UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/1 "2024-04-19T04:19:09Z")

</div>

Howdy. The dots are “trees”. I can group same types as a cluster with a distance too. But then I need to run a tag line (Landscape thing) through the lines that tidy. Something like 1 or 2 in the pic below. Was using a closest too method but its to random.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/2/9275fb2b92cabb25b1653c8e778650f257282ed1.jpeg)

as usually I’m just trying wacko stuff till I stumble across something.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/1/e190e534c57cc99206c2b6dcab6d36a1ed3c64f1.jpeg)

This land form node kind of does it

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a730f47cf8b654fb244ef3aff1efdc5a95bd9940.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 19, 2024, 5:46am UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/2 "2024-04-19T05:46:39Z")

</div>

Reverse every other list in the landform node. 🙂

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 19, 2024, 6:57am UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/3 "2024-04-19T06:57:47Z")

</div>

Also, for a “box” radial sorting you could generate bounding boxes of sequential sizes, center them on the collection of points, and use the first passing bounding box containment to get groups of rectangular loops. Then sort by angle about the Z axis to the X axis and back. Then flatten the list and play connect the dots.

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 3:40am UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/4 "2024-04-21T03:40:55Z")

</div>

Reverse every other list 🤔

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

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 5:39am UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/5 "2024-04-21T05:39:34Z")

</div>

What is first passing bounding box?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/d/7da3d4c83045e5b1f6b54d600be3e993cb72d458.png)

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 8:18pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/6 "2024-04-21T20:18:04Z")

</div>

owww do you mean reverse this list of coordinates? But those coordinates are grouped into a list of themselves. So maybe I get an average distance between the line and if its outside of that chop the list? Or something something 🤓 why is it so fun trying to work out these problems.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/a/9a8650b47f264ff553e80ca83bd28c9f1b3c3294.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 8:24pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/7 "2024-04-21T20:24:53Z")

</div>

Yes - after you group them into rows on the Y value, sort them by their X value, then reverse every other row. 🙂

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 8:29pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/8 "2024-04-21T20:29:00Z")

</div>

> [@vanman](#):
>
> What is first passing bounding box?

Build the lists of bounding boxes (you have this, but make sure they go from smallest to largest).

Use a bounding box containment test with the point as an @L1 input.

Get the first index of ‘true’ and use that to group the points.

One thing which will help: do one small set of points at a time. You have nested lists already and that is asking for a failure.

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 8:33pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/9 "2024-04-21T20:33:45Z")

</div>

Whats the best way to group in rows? How I was saying or do you know some other magic?

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 8:35pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/10 "2024-04-21T20:35:00Z")

</div>

ahhh yes! I wasn’t thinking about the order of the bounding box as I stared hopelessly at the true values in the wrong location. Although I was populating the circles size from a sequence node that was smaller to larger so you’d think theyd be in order.

I need to work with the nested lists as there locations for different grouped tagging lines.

The other method seems more promising I can work out. So unless we want to chase the dragon on this one. Could leave it.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d4bccab928b7715b7b9d903299d0b29928376fc4.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 9:15pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/11 "2024-04-21T21:15:07Z")

</div>

> [@vanman](#):
>
> Whats the best way to group in rows?

Offhand you might try this: List.GroupByKey(pnts,Math.Floor(pnts.Y/resolution))[“groups”];

Typing in my phone late on a Sunday so pardon any typos. 🙂

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 9:25pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/12 "2024-04-21T21:25:05Z")

</div>

I think I need an node that gives me the value between each number in the list. Which might be these floors ones. Ill experiment. Ow wait I group X by Y

now reversing every second list… Not sure how to extract every second list and then reintegrate. Ill insert points after I figure it out

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d038873d36d1a25cbcb6d9e37e70172db3577d7e.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 10:18pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/13 "2024-04-21T22:18:15Z")

</div>

> [@vanman](#):
>
> Not sure how to extract every second list and then reintegrate. Ill insert points after I figure it out

One way:  
List.Chop \> List.Transpose \> a[0]; a[1]; \> List.Reverse (a[1] list, longest lacing) \> List.Create \> List.Transpose

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 10:33pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/14 "2024-04-21T22:33:11Z")

</div>

tricky with the nested lists

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/6/464bb89ebc075e0a3b76f39ee70186abf19deadd.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 10:37pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/15 "2024-04-21T22:37:15Z")

</div>

List at level 3 for the chop. 🙂

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 10:38pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/16 "2024-04-21T22:38:47Z")

</div>

This might be relevant to your interests:

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

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 21, 2024, 10:52pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/17 "2024-04-21T22:52:06Z")

</div>

Organized and annotated:

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

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 11:00pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/18 "2024-04-21T23:00:04Z")

</div>

Still confusing myself here running through every lacing 🙃

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/009577d89c7a57f577e4880f9e80cc4904ea4a8d.jpeg)

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 11:05pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/19 "2024-04-21T23:05:50Z")

</div>

What about groups of points to have radial sorting? 😁 😁 😁

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 21, 2024, 11:15pm UTC](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226/20 "2024-04-21T23:15:17Z")

</div>

is this the same as trying to achieve the chop? Only thing is struggling to reverse the nested list and keep the list amount the same

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/6/e6dbeb40a86a2f66a077c68bd14268e1968103d3.jpeg)

na things are getting mucked up

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/f/0f779a7518c75fd8b13db526f3bd789496131dd0.jpeg)

[Next page](https://forum.dynamobim.com/t/sort-points-for-tag-line/100226.md?page=2)
