# Points of my curve are not in order, what happend here?

**URL:** <https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415>\
**Category:** Revit\
**Created:** [June 8, 2022, 10:46am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415 "2022-06-08T10:46:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 8, 2022, 10:46am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/1 "2022-06-08T10:46:03Z")

</div>

![2022-06-08_12h43_41](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/4/2481c669b2620dcd657759f1d01c1fa761ef765b.png)

Hello,

i want to create a curve pased on points (centerpoints of family instances). it creates a random line, why?  
how can i avoid that?

KR

Andreas

 ![2022-06-08_12h45_46](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/4/14c7f2cfcf5d4e050cf8bfaeef9846f62968a46d.png)

---

<div class="post-metadata">

**Author:** ![oliwerkulpa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/oliwerkulpa/32/129812_2.png) [@oliwerkulpa](https://forum.dynamobim.com/u/oliwerkulpa)\
**Post date:** [June 8, 2022, 10:56am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/2 "2022-06-08T10:56:23Z")

</div>

Are you sure that your family instances were _created_ in that order?

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 8, 2022, 10:58am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/3 "2022-06-08T10:58:47Z")

</div>

@oliwerkulpa ,it is a facade with panales, i can`t access my families via Element.Location+. so i used solid.centroid. The “order” is ruled by the host

---

<div class="post-metadata">

**Author:** ![oliwerkulpa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/oliwerkulpa/32/129812_2.png) [@oliwerkulpa](https://forum.dynamobim.com/u/oliwerkulpa)\
**Post date:** [June 8, 2022, 11:14am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/4 "2022-06-08T11:14:21Z")

</div>

I understand. However, it looks as though changing panel type introduces new instance id.

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

---

<div class="post-metadata">

**Author:** ![oliwerkulpa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/oliwerkulpa/32/129812_2.png) [@oliwerkulpa](https://forum.dynamobim.com/u/oliwerkulpa)\
**Post date:** [June 8, 2022, 11:26am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/5 "2022-06-08T11:26:30Z")

</div>

Apologies. It is related to the Revit itself and how it creates curtain walls. If I create a straight curtain wall, panels are in order. For some reason curvy curtain wall is built from endpoints to inside.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/b/eb20eaa8b12944a21545a423a38ddc4cf8f3500d.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/9862124add7ad8230d8f02adb811495898469e36.png)

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 8, 2022, 11:35am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/6 "2022-06-08T11:35:34Z")

</div>

@oliwerkulpa , is there a solution?

final aim is to place a view “normal” to the facade surface… panal by panel …

it is a regualar working process…

maybe i try to aviod this process, can i create instead a point in offset to a point ?

is there a baseline of a curtian wall, that i can access?

---

<div class="post-metadata">

**Author:** ![oliwerkulpa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/oliwerkulpa/32/129812_2.png) [@oliwerkulpa](https://forum.dynamobim.com/u/oliwerkulpa)\
**Post date:** [June 8, 2022, 11:48am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/7 "2022-06-08T11:48:51Z")

</div>

Have you tried any algorithm, e.g. traveling salesman algorithm? There is a node from Sparrow package, for Revit 2021. See here

> [@Shortest Path through Points (connect the dots)](https://forum.dynamobim.com/t/shortest-path-through-points-connect-the-dots/17610/5):
>
> Sounds like the traveling salesman problem. Did a quick google search, blatantly copied all the code from here: did a few quick changes to adapt it to Dynamo and came up with the below result: import System import sys pf\_path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ProgramFilesX86) sys.path.append('%s\IronPython 2.7\Lib' % pf\_path) import math import random from cStringIO import StringIO sys.stdout = StringIO() def distL2((…

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 8, 2022, 11:54am UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/8 "2022-06-08T11:54:26Z")

</div>

![2022-06-08_13h53_06](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/7/e7f75b606ec10c43b51e0dd6b093ac3e34699faf.png)

@oliwerkulpa ,

it looks better… maybe i have to separate each curtian wall, and not taking all walls

---

<div class="post-metadata">

**Author:** ![oliwerkulpa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/oliwerkulpa/32/129812_2.png) [@oliwerkulpa](https://forum.dynamobim.com/u/oliwerkulpa)\
**Post date:** [June 8, 2022, 12:08pm UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/9 "2022-06-08T12:08:50Z")

</div>

Definitely, add another layer of grouping before and it will be neat!

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [June 8, 2022, 1:36pm UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/10 "2022-06-08T13:36:57Z")

</div>

Hi @Draxl_Andreas,

Maybe you can use this to filter your centerpoints.  
You only have to pick a logical position for your referencepoint.

 ![FilterByDistanceToReferencePoint](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/2/f2c84d1c24d02ee60be5369886bc38ff4fca8dde.png)

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 8, 2022, 1:41pm UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/11 "2022-06-08T13:41:05Z")

</div>

@MJB-online ,

 ![2022-06-08_15h40_22](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/9/299e70ad592792556fcb5e5a69606b60ea8b1adb.png)

that works, to difine some kind of start!

---

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [June 8, 2022, 2:06pm UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/12 "2022-06-08T14:06:15Z")

</div>

Can you explain the final result?  
Are you trying to “number” the panels based on a specific order?

I’d use the Wall.Location to get the curve and then the center point to order them along that path

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [June 8, 2022, 2:28pm UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/13 "2022-06-08T14:28:32Z")

</div>

![2022-06-08_16h27_30](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9e4dbe25585c1a9a0ca124af31f434ee504ca494.png)

creating section, next step is creating views according to the panels @Daniel_Hurtubise

---

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [June 8, 2022, 4:01pm UTC](https://forum.dynamobim.com/t/points-of-my-curve-are-not-in-order-what-happend-here/77415/14 "2022-06-08T16:01:07Z")

</div>

Then my solution is still valid 🙂  
You can use the vector at tangent to get the perpendicular view
