Grasshopper

algorithmic modeling for Rhino

Hey everyone!!

I`ve been trying to find a solution for this but I wasnt successful!

I have numbers of lines, I got the list of the lengths and sort them from the smallest length to the largest, All I need to do is to divide the list to number of batches in a way that all the lines with difference of 400 mm will be in one batch (starting from the shortest line)

I hope this is applicable via grasshopper!

Anyone can help me? :)

Thanks

Views: 399

Replies to This Discussion

"[...] that all the lines with difference of 400 mm will be in one batch (starting from the shortest line)"

What do you mean by "difference"?

Are you looking to group all lines with lengths 0.0 to 400, then another group for all lines length 400 to 800? Or do you want to group all lines that are a minimum of 400 length units apart?

--

David Rutten

david@mcneel.com

This file groups all curves that fall within a certain length domain into a single tree branch.

--

David Rutten

david@mcneel.com

Attachments:

Hi David,

Yes I need to group all lines that are a minimum of 400 length units apart.

lets say the lengths are as bellow;

0- 264

1- 348

2- 578

3- 679

4- 932

5- 1103

In this case i will have a group containing items number 0 to 2 and another group of items 3 to 4 and so on..

so the difference of the numbers in each group will not exceed 400.

hope I made it more clear now :)

thank you for your reply.

Ah a maximum of 400! Now I get it.

However 2 and 3 are only 101 apart, so why aren't they in the same group? Or do you only start measuring from the first number until you run out?

--

David Rutten

david@mcneel.com

It probably doesn't work too well with more than one input list.

--

David Rutten

david@mcneel.com

Attachments:

The attached file works better when you have multiple lists, but it doesn't follow standard Grasshopper tree-growth logic.

--

David Rutten

david@mcneel.com

Attachments:

Great!! That`s exactly what I needed!

yes i`m only measuring from the first number.

Thank you so much David!

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service