# On ordering of points

(Georgelei) #1

Hi，everyone。I encountered a long time scheduling problem.I want to sort the order according to the black numbers in the picture.

kkk.gh (5.9 KB)

(Georgelei) #3

Hello, how do you mark it?

#4

There is a small litter bin below

(Georgelei) #5

I see. Thank you.

(Amir Touhidi) #6

Is there a simpler way? Maybe.

kkk_re.gh (6.3 KB)

(Georgelei) #7

An VIP plug-in can do this. Your method is very good. Thank you for your thoughts.

(Georgelei) #8

This is just an example. How do we sort a row row when it is not 5?

(Zach) #9

It doesn’t matter how many columns or rows, or how many items in each row or column.
The key is to have a clear logic of ordering points instead of doing it from an intuitve approach.

Note:
Intuitive approach also has a logic, you just gotta figure out what that is.
i.e. why are you ordering things that way

See Attached and DO play with the Thresold Slider to see the difference in Points Order.
It’s currently based on Y axis, and can be easily switched to X axis-based with very few changes.

Thresold based Point Sort.gh (12.4 KB)

(Tom) #10

well that’s partially true. You should always try to maintain logic, but this is not always practical and local ordering can be quite useful. Some useful applications:

• baking and re-referencing of geometry to/from Rhino
• irregular patterns
• closest geometry
• handling exceptional behaviour

However, compared to the diversity of searching algorithms, there is not much in GH.
However some components like “Sort Along Curve” are quite effective.

(Amir Touhidi) #11

Mostly it’s overkill to create a definition that responds to all possible variations of a problem, especially since people tend to be so terribly lazy in describing their issues. That’s why I mostly start small & only solve that specific problem - in a way forcing them to describe what they actually want. Anyway, here’s a more generic approach.

Thresold based Point Sort_re.gh (7.8 KB)

(Georgelei) #12

This helped me a lot. I also got one, which might be a little more complicated than yours.kkk_re.gh (18.4 KB)

(Georgelei) #13

I think the discussion can come up with an optimal solution. Thank you for your participation.

(Georgelei) #14

I think the discussion can come up with an optimal solution. Thank you for your participation. Your method is also very good.

(Zach) #15

That’s true when it comes to design or practice.

I once wrote a room renaming script in Dynamo for Revit, then the order of room numbers is completely based on hand drawing detail lines and their sequence of punching through each toom.

I said intuitive approach also has a logic, is mainly for pushing starters to change their mindset to work with computational process. I came across a lot of scenarios in which people knows how to do things manually but are too lazy to think about the reason behind it.

Then I guess the good thing is that if someone knows how to break down their inutive approach into steps of math process, then they will know how to use computational tools to solve probblems.

Obviously the future vision is a vague-self-learning kind of machanism like AI which people talk a lot these days, which essentially can replicate a intuitive approach by absorbing and analysing big data. But for now, it’s unfortunately still human jobs to do the adaption.

(Zach) #16

That’s a better approach, I never know the existence of the group points component, thanks.

As for me who works in an office in which no others knows anything about Grasshopper or Dynamo/Python, etc, I tend to write what-if-proof scripts for them to speed up the process and for the ease of use from a user point of view. And it’s true sometimes my nodes got doubled or tripled just for covering one minor or unexpected situation

(Georgelei) #17

We learn from each other, this is good.

(Georgelei) #18

Perhaps there will be a more convenient way of learning in the future, after all, human progress.