algorithmic modeling for Rhino
Tags:
row0 = grid(i - 1)
For i = 0 To grid.Count() - 1
Dim grid As New List(Of List(Of On3dPoint))
Lastly, since you're learning VB, I'd highly recommend you use the new Rhino SDK as it is a much friendlier development environment. You'll automatically get to use the new SDK if you switch to Grasshopper 0.7 and use the new Scripting components. The old scripting components are still there as well for legacy purposes so you won't lose any functionality.
I realize you're merely following a tutorial here.
I'll run this code after dinner, see if I can find all the problems.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Dim grid As New List(Of List(Of Point3d))
Dim row As New List(Of Point3d)
'Iterate over all points
For i As Integer = 0 To pts.Count - 1
'Add the current point to the current row.
row.Add(pts(i))
'If the row has gs items in it, it is complete and we move on.
If (row.Count = gs) Then
grid.Add(row)
row = New List(Of Point3d)
End If
Next
'If the last row is not empty, we have a wrong value of gs
If (row.Count <> 0) Then
Print("the gs value was wrong, it does not provide a complete set of rows")
Return
End If
Dim mid_pts As New List(Of Point3d)
For i As Integer = 0 To grid.Count - 2
Dim row0 As List(Of Point3d) = grid(i)
Dim row1 As List(Of Point3d) = grid(i + 1)
For j As Integer = 0 To row0.count() - 2
Dim mid_pt As Point3d = (row0(j) + row0(j + 1) + row1(j) + row1(j + 1)) / 4.0
mid_pts.add(mid_pt)
Next
Next
a = mid_pts
Dear David.
I'm trying to create a triply periodic minimal surface in Grasshopper but I have this message in milipede component index was out of range must be non-negative and less than the size of the collection. do YOU HAVE A solution for this problem.
I'm not the developer of millipede, nor do I have it installed. I think you need to ask someone else.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by