Option Explicit
‘Script written by mark bearak
‘Script copyrighted by dtls.architecture
‘Script version Monday, October 08, 2007 3:01:43 PM

Call Main()
Sub Main()
Call Rhino.EnableRedraw (False)
Dim arrPt, arrPoint()
Dim n : n = 0
Dim i, IntUpper : IntUpper = 125
Dim arrMajorPointa()
Dim arrMajorPointb()
Dim arrMajorPointc()
Dim arrMajorCross()
Dim strObject : strObject = Rhino.GetObject (“Pick your line to snort”, 4)
Dim arrPts: arrPts = Rhino.DivideCurve (strObject, IntUpper)
For Each arrPt In arrPts
ReDim Preserve arrPoint(n)
arrPoint(n) = Rhino.AddPoint (arrPt)
For i = 0 To IntUpper
ReDim Preserve arrMajorPointa(IntUpper)
ReDim Preserve arrMajorPointb(IntUpper)
ReDim Preserve arrMajorPointc(IntUpper)
ReDim Preserve arrMajorCross(IntUpper)
Dim arrCntPt : arrCntPt = Rhino.PointCoordinates (arrPoint(i))
arrMajorPointa(i) = Rhino.PointCoordinates (Rhino.AddPoint (array(arrCntPt(0)+((sin(i/8))/2)*10,arrCntPt(1)+((sin(i/8))/4+1)*10,arrCntPt(2))))
arrMajorPointb(i) = Rhino.PointCoordinates (Rhino.AddPoint (array(arrCntPt(0)+(((sin(i/8))/2)+.5)*10,arrCntPt(1),arrCntPt(2))))
arrMajorPointc(i) = Rhino.PointCoordinates (Rhino.AddPoint (array(arrCntPt(0)+(((sin(i/8))/-2)-.5)*10,arrCntPt(1),arrCntPt(2))))
arrMajorCross(i) = Rhino.AddInterpCurve (array(arrMajorPointa(i),arrMajorPointb(i),arrMajorPointc(i),arrMajorPointa(i)))
Call Rhino.AddLoftSrf (arrMajorCross)
Call Rhino.DeleteObjects (arrMajorCross)
Rhino.Command “Selpt Delete ”
Call Rhino.EnableRedraw (True)
End Sub

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s