Grasshopper

algorithmic modeling for Rhino

What I want to achieve is from a list of points, check if the point next to it is there, and then generate a 0 of a 1 for presence or not presence. I want to do this with all 8 dots surrounding it (its a wall, of 1 layer of dots). By 'moving' the dots along a vector I can displace the dots to the position where an other dot could be.

By using index-list on the original list, and as items using the displaced list I thought I could check if the displaced dot is also present in the orignal list. This does not work. If I simply jitter the list I can still find all the value's indexes. But if I move the dots along a axis, the index-list gives all -1 (value not present) somehow.

Any help and/or insights about this issue are very much appreciated.

I added the original script, zoomed to the function I'm talking about, and a screenshot of the function.

Views: 403

Attachments:

Replies to This Discussion

In further research I can add, that it seems that the item index works with the list, if i subtract a item and then uses it's value to find it with item index, it works, if I jitter the list it works, but as soon as u use 'new' data, an integer, an panel, an move/transform numbers, it ALWAYS returns -1, instead of as i expected it to do, if the given value is present in a list, return its index number. 

You need to use the [Member Index] component, it does what you need. You can search the forum for other topics regarding List Index, it's been talked about before. Basically, it doesn't work the way you, and pretty much everyone else :) thinks it works.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you so much this exactly what i mean!

ANd very sorry, I did try to search the forum apperantly wrong. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service