final project _ initial script

Call Main()
Sub Main()
Dim arrPlane, i, strCrv(), strInnerCrv(), strSrf(), strLftCrv, arrX, arrPt(), arrInnerPt(), counter
Dim strCrvv, strInnerCrvv, strLftCrvv, j, dblDist, arrTempPt, arrTempInnerPt
For i = 2 To 13
arrX = sin(i/15*3.14)*12
ReDim Preserve strCrv(i-2)
ReDim Preserve strInnerCrv(i-2)
ReDim Preserve strSrf(i-2)
arrPlane = Rhino.PlaneFromPoints (array(0,0,i), array(1,0,i), array(0,1,i))
strCrv(i-2) = Rhino.AddCircle (arrPlane, arrX)
strInnerCrv(i-2) = Rhino.AddCircle (arrPlane, arrX-1)
If i = 13 Then
Call Rhino.AddPlanarSrf (array(strCrv(i-2)))
Else
Call Rhino.AddLoftSrf (array(strCrv(i-2),strInnerCrv(i-2)))
End If
Next

Call Rhino.DeleteObjects (strCrv)
Call Rhino.DeleteObjects (strInnerCrv)
For j = -180 To 179 Step 30
counter = 0
For i = 1 To 14
arrX = sin(i/15*3.14)*12
ReDim Preserve arrPt(counter)
ReDim Preserve arrinnerPt(counter)
arrTempPt = Rhino.Polar (array(0,0,0), j, arrX)
arrPt(counter) = array(arrTempPt(0),arrTempPt(1),arrTempPt(2)+i)
arrTempInnerPt = Rhino.Polar (array(0,0,0), j, arrX-1)
arrinnerPt(counter) = array (arrTempInnerPt(0),arrTempInnerPt(1),arrTempInnerPt(2)+i)
counter = counter + 1
Next
strCrvv = Rhino.AddCurve (arrPt)
strinnerCrvv = Rhino.AddCurve (arrinnerPt)
strLftCrvv = Rhino.AddLoftSrf (array(strCrvv, strInnerCrvv))
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