Grasshopper

algorithmic modeling for Rhino

Hi Guys,

 

I have several questions to archive my goal:

 

1. filter one list into several separate lists by value. 

 

2. New lists should somehow keep the original list index.

 

3. Replace some value in new list and put it back in the original list without changing original list order.

For examples:


Views: 1093

Replies to This Discussion

Hello

you can try the following

cheers

alex

a slight variation to Alex's...if you sort your list before you create a set, you can ensure its order and shift it to derive your replacement values

nice! i totally missed the shift objective and went for a panel.

Thank you Alex and David, it works really well!

I have another question:

With the flatten on, it will replace every first index of the different category

How to control them separately?

For example: we want to random replace 100 to 400, random replace 200 to 5, random replace 300 to 1. How could we separately control this three category inside one list?

Thank you guys so much for the help!

JJL

Hi Guys,

 

I think I found a way to control them separately by using branch tools, not sure if this is the best way, but it is working for now.

Thanks again,

JJL

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service