Grasshopper

algorithmic modeling for Rhino

Hello.

I have a problem by organizing my data.

I divided my closet polyline in eight point each. now I want to match just single points of each list to connect them with a line. So I want to draw a line from point 0-1, 2-3, 4-5, and so on. how can I do this. Im talking from the in the picture opened yellow parameter list. Any help is appreciated.

Thank you.

Views: 1615

Attachments:

Replies to This Discussion

Can't see your geometry.

You need to internalise your original references

You just take the data and use "shift list" and shift it by -1. You also take you data and delete the last entry in each list using "cull index" and using index -1. Now you connect both lists to a line component.

Hope that helps! 

Actually, sorry, that wasn't quite right. You also need to cull the last index of the shifted list, because usually you dont want to connect the last point again to the first point.

Here is an example:

Attachments:

thank you. it helped me a lot!

A good trick here is to just use two shift paths, one set to "Shift" 1 and the other to -1, and then set "Wrap" to false. Not wrapping the lists pushes the shifted values out of the list and reduces the list size...

Nice! Will remember that.

Thanks.

You can do this will Relative Item quite easily 

You need to panel tree with the data tree (it works fine here with {0} and simplify)

but if you get an error when you plug it in a larger code this will be usually why.

This Video should explain how it works for more than just this Shift List question.

https://vimeopro.com/rhino/grasshopper-masterclass-with-david-rutte...

Hope it some help.

Matt

Thanks a lot!

Oliver

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service