Grasshopper

algorithmic modeling for Rhino

Hello everyone! 

I'd like to know if there is any way to divide a long list of points into a given number of sublists using the path mapper.

I have 640 paths with 1 item each, and I would like to divide them into 16 paths of 40 items each.
I've been going around the problem by using sublists with manually written domains: (0.0 to 39.0) (40.0 to 79.0) (etc--) but I would want to have it flexible so that the number of items in the original list could vary.

I'm sure it's something very easy to do...but can't figure my way through the path mapper!

Thank you so much for your help!

Views: 536

Replies to This Discussion

hi mark,

you can use two series in a row to get a list in almost every order. if you look at the picture of the gh-definition you see that the first series creates the starting point of each sublist and the second series fills it up with a count of items...


good luck

boris
Attachments:
Dear Boris,

Thank you so much for your answer!!
I've been working at the problem for a while now, and here I post the definition that makes it work for what I wanted...
It basically builds a series of domains within a min and max values set to the length of the original list of objects. Then I feed this into a Sublist component as a domain index pattern. From there I can extract the data tree structure that I need!


I got the solution from this blog post:

http://www.grasshopper3d.com/forum/topics/how-to-split-a-data-list-...

Again, thank you very much for your attention!!

M.A.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service