Lexicographic sorting


#1

Hi,

How can I sorting coordinates in lexicographic fashion on Dynamo?

Which nodes I can use for this?

For example, I have coordinates extrated from “location.point” property on families (e.g.: walls). So, I need sorting these coordinates and after fill the Mark property of these families.

Any suggestions?


#2

Is this what you’re after?


#3

Hi @Yna_Db!

This post is using Python and Design Scripting for solve lexicographic sorting.

Its my impression, or this problem can be solved only with textual languange?

How can I solve this problem using only standard Dynamo nodes?


#4

There are other solutions to the issue exposed in the same thread, but for a better understanding of what you seek, an illustration would be welcome :slight_smile:


#5

Well, I have some walls that I need sorting in clockwise order, like show in the figure below. I’m using the “Mark” property to put the wall number.

In this case, whats the better solution?

WallsNumbering


#6

Just thinking here,
Find the centroid of the combined walls, create vectors from the centroid to the midpoint of each wall, sort the vector angles to Y vector, use geometry closet point?


#7

I think I was able to solve my problem using the graph below.

Logic works, but two warning messages are popping up. How do I avoid these messages?

AutoNumeraçãoParedes-R00.dyn (17.6 KB)