Grasshopper

algorithmic modeling for Rhino

Hallo

Rather easy..but i actually don't get it..

Is there a way to remap some DataTree like the following without scripting?

{1,2,3,5},{6,7,8,9},{10,11,12,13},{14,15,16,17},{18,19,20,21},{22,23,24,25}

Now, I want to remap the indices from 4 branches to a (new) branch and so forth. If the number of branches is not divisible by 4 the 'rest' should be remapped accordingly.

{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17},{18,19,20,21,22,23,24,25}

thx in advance

Thomas

Views: 663

Replies to This Discussion

I'm not sure I quite understand your question.  Is this what you're looking to do?  I'm using integer division here along with Replace Paths.  If not..would it be possible to clarify or post your definition?

Thx, David. That is exacly what I was looking for.

ah..there is another problem. your definition seemingly needs a single-path DataTree. If there are more paths it doesn't work. Simplifying doesn't solve the problem either..

any ideas?

Ok, i found a solution. The path decomposition didn't fit in there. I replaced it by a series of integers from 0 to the total number of branches which gives me the expected result.

Nice.

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