Grasshopper

generative modeling for Rhino

Break single path into multiple paths at specific indices.

I have a list of items (under one branch) which I would like to split into separate branches at a list of specific indices.

 

Is my question clear?  Anyone know how to do this?

Tags: Branch, Data, List, Tree

Views: 527

Reply to This

Replies to This Discussion

There's a great new component in version 0.8.0064 which generates a list of consecutive domains from a single list of numbers. This used in conjunction with the SubList component gives you your desired split.

It's not the end of the world if you don't have the latest version because it's easy enough to generate the domains with Shift List

 Hi, Danny!

  I think this consecutive domains component is very powerful. Comment/Question:

Is there a direct way of generating the domains bounds  --taking your example-- like this:  0.0 To 1.0, 2.0 To 5.0,  6.0 To 8.0,  9. To 14.0,   15.0 to 23.0   .  There are many situations where you do not want to repeat an intermiadiate domain limit.

By using the Shift List method you can have an Expression on the B input of the Domain Component of B-1. Note that my original list must have the last number larger than the intended domain.

Thanks a lot for your expertise, Danny

Simple Enough!  Thank you!

May I ask a complementary question; better through a simple example ?

How to get List B from List A ?
List A                        List B
             {0}                         {0}
0.   {0;1}                  0.   1
1.   {0;3}                  1.   3
2.   {1;1}                              {1}
3.   {1;2}                  0.   1
4.   {1;4}                  1.   2
5.   {2;1}                  2.   4
6.   {2;2}                              {2}
                                0.   1
                                1.   2

Danny, brilliant, simple and mighty! Thank you again !

RSS

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service