Grasshopper

algorithmic modeling for Rhino

hi there,

i would like to sort rectangles by there widht/height and generate a sortet list of the pairs (widht/height)

for example unsortet

10/10

5/10

20/8

10/2

8/5

to sortet

10/10

10/5

10/2

8/20

8/5

(widht/height should change as shown)

anyone ? thank you !

Views: 541

Replies to This Discussion

Your output data doesn't match your input list.

Attachments:

thank you for the definition.

i thought i would abstract my problem, but now im realize its about clustering my lists, see my screenshot for making it more clear.

sorted to unsorted

Attachments:

This builds a bit from Joseph's first logic and assigns paths by the dimensions, then applies transformations to each of the branches in order to set out the rectangles. I'm sure there is a cleaner way of doing this, but it's the end of a day...


If you already have a set of rectangles you'll need to place them in the same spot first (find a vector from the first control point to 0,0,0 and transform each by this. You could then use the length of the first two segments to arrange the data as first presented. Hopefully this helps you get somewhere?

Attachments:

my head is burning :-) thanks i will have a look and come back soon !

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service