Grasshopper

algorithmic modeling for Rhino

I'm having trouble with list management. I need to split a list into N smaller partitions. The last element of each partition needs to be copied / inserted into the next partition. The last element of the last partition needs to copied/inserted as the first element in the first partition. Any suggestions on how this could be done? Path mapper?

Views: 465

Replies to This Discussion

Certainly not Path Mapper. It only reassigns items in a tree, it has no mechanism for duplicating them (only overwriting them, which effectually allows you to delete certain items).

I think it will have to be done in several steps:

--

David Rutten

david@mcneel.com

Attachments:

Another possible approach is to use SubList and then provide overlapping index domains.

--

David Rutten

david@mcneel.com

Thanks David, will look at this now.

I struggled on a bit (good for path mapper learning's), got closer till an issue with last / first segment:

Perfect! Exactly what I needed, did the job and I learned something. Thank you Sir!

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service