algorithmic modeling for Rhino
Tags:
For i As Int32 = 0 To u - 3 Step 4
For j As Int32 = 0 To v - 3 Step 2
ptArr.Append(arrPt(i + 1, j).x, arrPt(i + 1, j).y, arrPt(i + 1, j).z)
ptArr.Append(arrPt(i + 2, j).x, arrPt(i + 2, j).y, arrPt(i + 2, j).z)
ptArr.Append(arrPt(i + 3, j + 1).x, arrPt(i + 3, j + 1).y, arrPt(i + 3, j + 1).z)
ptArr.Append(arrPt(i + 2, j + 2).x, arrPt(i + 2, j + 2).y, arrPt(i + 2, j + 2).z)
ptArr.Append(arrPt(i + 1, j + 2).x, arrPt(i + 1, j + 2).y, arrPt(i + 1, j + 2).z)
ptArr.Append(arrPt(i, j + 1).x, arrPt(i, j + 1).y, arrPt(i, j + 1).z)
ptArr.Append(arrPt(i + 1, j).x, arrPt(i + 1, j).y, arrPt(i + 1, j).z)
Dim pline As New OnPolyline(ptArr)
lines.Add(pline)
Dim pt As New On3dPoint((arrPt(i, j).x + arrPt(i + 3, j + 2).x) / 2, (arrPt(i, j).y + arrPt(i + 3, j + 2).y) / 2, (arrPt(i, j).z + arrPt(i + 3, j + 2).z) / 2)
pt_list.Add(pt)
ptArr.destroy
Next
Next
For i As Int32 = 2 To u - 3 Step 4
For j As Int32 = 1 To v - 3 Step 2
ptArr.Append(arrPt(i + 1, j).x, arrPt(i + 1, j).y, arrPt(i + 1, j).z)
ptArr.Append(arrPt(i + 2, j).x, arrPt(i + 2, j).y, arrPt(i + 2, j).z)
ptArr.Append(arrPt(i + 3, j + 1).x, arrPt(i + 3, j + 1).y, arrPt(i + 3, j + 1).z)
ptArr.Append(arrPt(i + 2, j + 2).x, arrPt(i + 2, j + 2).y, arrPt(i + 2, j + 2).z)
ptArr.Append(arrPt(i + 1, j + 2).x, arrPt(i + 1, j + 2).y, arrPt(i + 1, j + 2).z)
ptArr.Append(arrPt(i, j + 1).x, arrPt(i, j + 1).y, arrPt(i, j + 1).z)
ptArr.Append(arrPt(i + 1, j).x, arrPt(i + 1, j).y, arrPt(i + 1, j).z)
Dim pline As New OnPolyline(ptArr)
lines.Add(pline)
Dim pt As New On3dPoint((arrPt(i, j).x + arrPt(i + 3, j + 2).x) / 2, (arrPt(i, j).y + arrPt(i + 3, j + 2).y) / 2, (arrPt(i, j).z + arrPt(i + 3, j + 2).z) / 2)
pt_list.Add(pt)
ptArr.destroy
Next
Next
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
© 2024 Created by Scott Davidson. Powered by