Therese Diede _ vase _wk1

Option Explicit
‘Script written by Mark Bearak, adapted by Therese Diede
‘Script copyrighted by dtls.Architecture
‘Script version Tuesday, October 28, 2008 5:25:04 PM

Call Main()
Sub Main()
Dim arrPlane, i, j, strCrv(), strInnerCrv(), strSrf1, strSrf2, arrLftSrf1, arrLftSrf2, arrLftSrf3
For j = 0 To 5
For i = 0 To 15
ReDim Preserve strCrv(i)
ReDim Preserve strInnerCrv(i)
arrPlane = Rhino.PlaneFromPoints (Array(0,j*25,i*(j+1)), Array(1,j*25,i*(j+1)), Array(0,j*25+1,i*(j+1)))
If i < j-2 Then
strCrv(i) = Rhino.AddEllipse (arrPlane, 9.0, 12.0)
strInnerCrv(i) = Rhino.AddEllipse (arrPlane, 8.0, 11.0)
If i = 0 Then
Call Rhino.MoveObject (strInnerCrv(i),Array(0,0,0),Array(0,0,1))
End If
Else
strCrv(i) = Rhino.AddEllipse (arrPlane, 20.0, 15.0)
strInnerCrv(i) = Rhino.AddEllipse (arrPlane, 19.0, 14.0)
End If
If i = j-2 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j-1 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j+1 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j+2 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j+3 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j+4 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 4.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 3.0)
End If
If i = j+5 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 8.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 7.0)
End If
If i = j+6 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 12.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 11.0)
End If
If i = j+7 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 22.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 21.0)
End If
If i = j+8 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 22.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 21.0)
End If
If i = j+9 Then
strCrv(i) = Rhino.AddCircle (arrPlane, 22.0)
strInnerCrv(i) = Rhino.AddCircle (arrPlane, 21.0)
End If
If i = 0 Then
strSrf1 = Rhino.AddPlanarSrf (strCrv)
strSrf2 = Rhino.AddPlanarSrf (strInnerCrv)
End If
If i = 15 Then
arrLftSrf1 = Rhino.AddLoftSrf (Array(strCrv(i),strInnerCrv(i)))
End If
Next
arrLftSrf2 = Rhino.AddLoftSrf (strCrv,,,1)
arrLftSrf3 = Rhino.AddLoftSrf (strInnerCrv,,,1)
Call Rhino.JoinSurfaces (Array(arrLftSrf1(0),arrLftSrf2(0),arrLftSrf3(0),strsrf1(0),strsrf2(0)),True)
Call Rhino.deleteobjects (strCrv)
Call Rhino.DeleteObjects (strInnerCrv)
Next
End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s