Grasshopper

algorithmic modeling for Rhino

Hey guys,

Is there a more efficient way to restructure the data as seen from the image attached. I could use the "explode and entwine" because i don't have a lot of data but what if i need to do this for a series of curves. Maybe using path mapper? Not sure.

Thanks.

Views: 966

Replies to This Discussion

Looks like something similar with this?

Attachments:

Thanks Hyungsoo. I guess the shift list side of things is what i needed. 

Here's a similar example to what Hyungsoo posted. I think this is what you were aiming for. If you replace the text inputs with a flattened list of curves, then it should work exactly as you have pictured above, but you don't need to use the Entwine component.

Essentially, you have to take two lists, one without the first item and one without the last item. This can either be done through the cull index component, or through the shift list component with "Wrap" set to "false". This will 'push' the last item off the list if you shift each index by 1 and push the first item off the list if you shift each index by -1. Setting wrap to false prevents the last and first items from being replaced at either end of the list and instead deletes them from the list entirely.

Exactly what i needed thanks Chris.

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