Grasshopper

algorithmic modeling for Rhino

Hi,

I have multiple voronoi cells on a plane. This plane I have populated with points.

Now I want to find the closest points on the voronoi polyline, for all set points. On the picture you can see the points refering to the green voronoi. It works, when I cut that part out. When I want to implent the whole voronoi, it doesn't work.

I think its because they are 7 cells/ polylines that I can not join. I don't know how to join them or how to implement the whole thing in the [crv cp].

I think its something about my data structure, I am always fighting with that ... :(

Thanks for help!

--

max

Views: 7496

Attachments:

Replies to This Discussion

Do not use trim but RegionIntersection (RInt) to trim the cells. This will return closed polylines for each cell.

hey hannes,

thanks for you answer.

The voronoi already starts with (7) closed polylines. What I think I need is one closed polyline, so I can make the the [crv cp] with it.

Calculate all CP's for each cell and select the closest per cell. Will connect all points to the closest line of all.

Attachments:

Thanks! Perfect!

I knew it was possible, but I could have  never  thought of that solution myself.
Thats datamatching, isn't it? I strongly need a good tutorial in that...

Well, that's the true power of GH.

Graft isolates each point, so each point is matched up to all 7 cell curves. Then sort those points per Distance from the curve. That's a list of 7 points per original point. Select only the first item form the CPs.

PShift acts like a flatten but is more general if you already have a tree of curves or points to begin with.

Well, that's the true power of GH.

Well there you're certainly right. And it also seems difficult to learn.

Thanks for the further explanation Hannes!

Hi,

so I have another question, and I feel its always the same problem I have, but in different situations.

I want to separate the points in each cell, by whether they are above or below a point in y direction. I can't figure out how to do that for each cell. [I suppose it has something to do with shifting and grafting and pathing and whatever...xD]

I already have the closest points for a each cell, but I dont know how to go on with that information.
And pls, if someone could share a link where advanced (or basic ^^) list culling is explained, I'd appreciate that, because I really struggle with it, don't know where to learn it from and it takes a lot of time.

Thanks,

--

max

I solved the problem and opened a new discussion with the solution here:
http://www.grasshopper3d.com/forum/topics/data-structure-with-close...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service