Grasshopper

algorithmic modeling for Rhino

I am working on a definition that relies on distances to points, so far everything has been fine, until I decided to add more points to calculate the distance between. In short I have 66 rectangles and when I calculate the distance to the points I have selected I get 66*#of points in the output list. I need to break the list into groups of 66, or rather 0-65,-66-132, and so on. I have to use the cross reference function or else I will not get the distances to all points. I started working with the subset using an interval, but that seems incredibly inefficient, given how many points I am drawing on. Any ideas?

Views: 549

Replies to This Discussion

You are on to something with the subset and interval components. Create an interval from two series of numbers where the first is 0, 66, 132, and so on, and the other is 65, 133, 198, ... Make the first series the lower limit of your interval and make the second the higher limit. When you connect this to the subset (and turn on flatten for the list input to the subset component.) it will create a nested list with 66 items in each branch.

Good luck
I am still working on this and have made some progress and I think I have it down to one last step.
I have a VB.net box with inputs that are the number of points selected and number of objects (rectangles) with a nifty little equation that creates the intervals exactly how i want them. The step i am missing is how to get the the data out of the VB.net box correctly. I keep getting just the last value from the loop, instead of all the values generated during the loop from i=1 to y. I need the out put to be a string or list, and and I can not for the life of me add or append the values to the list. Anyone who could plug in the line I'm missing would be my hero.

this is what the VB.net looks like currently:
Dim i As Integer
Dim Q As Integer
Dim R As Integer
Dim S As String
Dim T As String

For i = 1 To y
If i = 1 Then
Q = 0
R = (x - 1)

Else
Q = (x * (i - 1))
R = ((x * i) - 1)

End If

' I am sure this is where i need to add the values for Q and R to strings S and T

A = S
B = T

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