JA_3

Option Explicit
‘Script written by <insert name>
‘Script copyrighted by <insert company name>
‘Script version Wednesday, October 01, 2008 3:42:11 PM

Call Main()
Sub Main()

Dim arrCrvs : arrCrvs = rhino.GetObjects(“pick crvs”)
Dim i,j
Dim xLayer,yLayer
Dim arrpts
Dim arrPlane
Dim arrplaneRef : arrPlaneRef = Rhino.WorldXYPlane
Dim srf, borders, borderCent
Dim newOrigin

Dim counter : counter = -1

Call rhino.EnableRedraw(False)
For i = 0 To Ubound(arrCrvs)
arrpts = Rhino.DivideCurveLength(arrCrvs(i), 0.4)
If isArray(arrpts) Then
For j = 0 To UBound(arrpts)

counter = counter +1
If counter < 130 Then
If counter = 0 Then
xLayer = 5
yLayer = 5
Else
xLayer = xLayer-0.015
yLayer = yLayer-0.015
End If
Else
If counter < 160 Then
xLayer = xLayer-0.05
yLayer = yLayer-0.05
Else
xLayer = xLayer+0.05
yLayer = yLayer+0.05
End If
If xLayer > 1.25 Then
counter = 130
End If
End If

newOrigin = Rhino.PointAdd(arrpts(j), array(-xLayer/2,-yLayer/2,0))
arrPlane = rhino.MovePlane(arrplaneRef, newOrigin)
srf = Rhino.AddPlaneSurface (arrplane, xLayer, yLayer)

‘Rhino.SelectObject srf
‘Rhino.Command (“Dupborder”)
‘Rhino.UnselectAllObjects
‘Rhino.DeleteObject srf
Next
End If
Next
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 )

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