Grasshopper

algorithmic modeling for Rhino

Hi,

Does anyone have GH way of finding and identifying the neighboring cells? I'm sure a VB version is the more straight forward way, but I'm interested in a pure GH def. way...


I was trying to find it trough a intersection of curve and the neighbor cell, but I've got kind of lost...

Thanks
//A

Views: 10637

Attachments:

Replies to This Discussion

Hi Ali
if you calculate the center-points of the surface-tiles (average the vertexpoints) you can sort them according their distance to the testpoint (centerpoint of test-tile). The first four are the one you are searching,....if you want all 8 tiles you can search for the equal corner points
Thanks, I'll give it a try... could you please elaborate on the ...(average the vertexpoints). I'm not 100% sure;o)

//A
Hi

this is the trick:

...hmm, I'm not doing it right!?! and if I set the split at 5 then I have a problem with the edge cells...


//A

... thanks!

Another issue though:o) The edge cells still produce 4 neighbors (where should be 3) and also corners should have only 2 neighbors...

Best
//A
Hi Ali
this should work

Thanks for the effort, I appreciate it allot.

I'm sorry... I cant get this one to work at all! could you please upload the file? or just explain 2 things: the 0.01 what is that? Also, I cant really define what is being culled at the end... the wire seems coming from the cull index!?!

//A
the 0.01 is just for get rid of rounding errors
and yes i cull from the cull index component

to]
i forgot to mention the distance component is set to cross-reference

to]
wow... thanks.

//ALi
...another question!
How can we group the neighboring cells as a list? We are sorting them out from one cell at a time... but how can we make a set out of each cell and identify its neighbors as a list?

I was trying to replace the slider, but that didn't work out...

//A

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service