Grasshopper

algorithmic modeling for Rhino

sort curves from bottom to top and left to right

Hello !
I would like to sort my curves from bottom to top and from left to right in order to optimize the work of my machine 3axes (woodworking). I can sort them from bottom to top but to sort from left to right, I think I need to create lists according to Y, but the "create set" component does not seem to work well. Could you help me?

Thank you

Pierre

(excuse my bad english)

Views: 2709

Attachments:

Replies to This Discussion

Something like this?

Attachments:

Create Set won't help you, because none of your points are the same. Therefore they will all end up in the set. Also, sets do not have meaningful ordering to begin with, they are unordered data structures that can only contain a specific value once.

You can use Sort, but your sorting key must be some combination of X and Y. Since you want to order along X first, you can 'amplify' the importance of that direction.

Attachments:

thank you both


I used the version of kim, because in some cases, the version of david did not work, the order was not good. I would post this case tomorrow if you want to see


Here is the application of this definition (It saves me a lot of time)

excuse me david, your version works very well and is very fast (an error on my part), Thank you very much

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service