Grasshopper

algorithmic modeling for Rhino

I'm blanking on an efficient method for culling specific items from a list with reference to intervals within a domain ... for example, in the image below you will see that the definition picks items that are between 0.0 and 0.1

 

What I'd like to do (instead of copying and pasting 9 times) is the same process, but for all the items of the domain from 0.0 to 1.0, for example - pick items between 0.1 - 0.2, 0.2 - 0.3, 0.3 - 0.4 and so on ...  

 

Ideally, these items would be within their own lists so that I can act on them as independent groups ...

 

 

Views: 3494

Replies to This Discussion

Hi Nick,

one way might be this:

There is no need for Min-Max if the domain is always known to be either increasing or decreasing.

- Giulio
_____________

giulio@mcneel.com
McNeel Europe, Barcelona

another approach, sorting a list of values into paths by the domain in which they fall:

 

(That component in the middle is "Includes" from the Domain panel.)

Nice, I like this way better Andrew!

Nick, in case you have two numbers, you can make a domain with the "Domain" component

- Giulio
___________

giulio@mcneel.com
McNeel Europe, Barcelona 

Andrews approach is great way, but you have to watch out if a number lands exactly on a domain start/end it will be included twice once in the lower domain once in the higher giving you duplicate values.

 

@ David.... Would be great if we could have an overlap toggle that decide if domains are split 1-2, 2-3..... or 1- 1.99... , 2-2.99... and so on.

Thanks for the replies everyone.  Andrew, thanks for introducing that component to me.

Your method worked perfectly - here's how I used it:

To create the domains, I simply developed a range from 0 to 1, grafted each number, shifted the list to match up my desired domains, and plugged them into the Includes component ...

 

cheers!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service