(n)certainties – Columbia – Fall 2007

071018_M.Bearak_Meshing Test

Option Explicit
‘Script written by mark bearak
‘Script copyrighted by dtls.architecture
‘Script version Wednesday, October 17, 2007 12:19:11 PM

Call Main()
Sub Main()
Dim j, k, l, n
Dim arrStart, arrPoint, arrPlane
Dim dblLength : dblLength = 16
Dim dblHeight : dblHeight = 3
Dim Arrpta(), Arrptb(), Arrptc(), Arrptd()
Dim dblRadius : dblRadius = .2
j = 0
For k = 0 To 12
ReDim Preserve ArrPta(k), ArrPtb(k), ArrPtc(k), ArrPtd(k)
l = j
If (k Mod 2 = 0) Then
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l+.5,0), Array(k*dblLength,l,0), Array(k*dblLength,l+.5,1))
arrPta(k) = Rhino.AddCircle (arrPlane, dblRadius)
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l-.5,0), Array(k*dblLength,l,0), Array(k*dblLength,l-.5,1))
arrPtb(k) = Rhino.AddCircle (arrPlane, dblRadius)
Else
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l+.5,dblHeight),Array(k*dblLength,l,dblHeight), Array(k*dblLength,l+.5,dblHeight+1))
arrPta(k) = Rhino.AddCircle (arrPlane, dblRadius)
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l-.5,dblHeight),Array(k*dblLength,l,dblHeight), Array(k*dblLength,l-.5,dblHeight+1))
arrPtb(k) = Rhino.AddCircle (arrPlane, dblRadius)
End If
If (k Mod 2 = 1) Then
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l,dblHeight/2-.25), Array(k*dblLength,l+1,dblHeight/2-.25), Array(k*dblLength,l,dblHeight))
arrPtc(k) = Rhino.AddCircle (arrPlane, dblRadius)
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l,dblHeight/2+.25), Array(k*dblLength,l+1,dblHeight/2+.25), Array(k*dblLength,l,dblHeight))
arrPtd(k) = Rhino.AddCircle (arrPlane, dblRadius)
Else
If (k Mod 4 = 0) Then
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l-1.5,dblHeight/2-.25), Array(k*dblLength,l+3,dblHeight/2-.25), Array(k*dblLength,l-1.5,dblHeight))
arrPtc(k) = Rhino.AddCircle (arrPlane, dblRadius)
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l+1.5,dblHeight/2+.25), Array(k*dblLength,l+3,dblHeight/2+.25), Array(k*dblLength,l+1.5,dblHeight))
arrPtd(k) = Rhino.AddCircle (arrPlane, dblRadius)
Else
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l+1.5,dblHeight/2-.25), Array(k*dblLength,l+3,dblHeight/2-.25), Array(k*dblLength,l+1.5,dblHeight))
arrPtc(k) = Rhino.AddCircle (arrPlane, dblRadius)
arrPlane = Rhino.PlaneFromPoints (Array(k*dblLength,l-1.5,dblHeight/2+.25), Array(k*dblLength,l+3,dblHeight/2+.25), Array(k*dblLength,l-1.5,dblHeight))
arrPtd(k) = Rhino.AddCircle (arrPlane, dblRadius)
End If
End If
Next
Call Rhino.AddLoftSrf (arrPta)
Call Rhino.DeleteObjects (arrPta)
Call Rhino.AddLoftSrf (arrPtb)
Call Rhino.DeleteObjects (arrPtb)
Call Rhino.AddLoftSrf (arrPtc)
Call Rhino.DeleteObjects (arrPtc)
Call Rhino.AddLoftSrf (arrPtd)
Call Rhino.DeleteObjects (arrPtd)
End Sub

Leave a Comment

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment