Grasshopper

algorithmic modeling for Rhino

nested voronoi: 2nd gen cells grouped according to 1st gen cells?

Hi all !

did anyone come up with a way to group the second generation cells in paths according to the specific cell they are nested in?

thanks a lot!

Views: 386

Replies to This Discussion

because the cell they are nested in will always be defined by the closest point in G1, you can use the Closest Point component to figure out the nested-in cell's index and then use that index to assign a DataTree structure.

The VB Script here is really simple:
Private Sub RunScript(ByVal br As List(Of Integer), ByVal D2 As List(Of OnCurve), ByRef Nst As Object)
Dim dtOut As New DataTree(Of OnCurve)

For i As int32 =0 To D2.Count - 1
Dim pth As New gh_path(br(i))
dtout.Add(D2(i), pth)
Next

Nst = dtOut
Attachments:
very interesting workaround. thanks a lot!

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