option Explicit
‘Script written by ben howell
‘Script copyrighted by md+x
‘Script version Saturday, October 06, 2007 11:19:09 PM

Call Main()
Sub Main()
Dim i,j
Dim arrPt()
Dim intLow : intLow = 0
Dim intUp : intUp = 100
Dim n: n = 0
Dim x : x = 10
Dim y : y = 10
Dim strObject, arrVertices, arrVert, strObjPt, arrMeshes
Dim arrObjects
Dim t
t = 0

For i = 0 To x
For j = 0 To y

If n = (x*y – 1) Then
arrMeshes = Rhino.AllObjects
For Each strObject In arrMeshes
arrVertices = Rhino.MeshVertices(strObject)
Dim arrCentPt : arrCentPt = Rhino.MeshAreaCentroid(strObject)
‘Rhino.AddPoint arrCentPt
Dim dblDistance
If IsArray(arrVertices) Then
ReDim Preserve newArrVertices(0)
ReDim Preserve newstrObj(0)
newArrVertices(0) = arrVertices(0)
dblDistance = Rhino.Distance(newArrVertices(0),arrCentPt)
Rhino.MoveObject strObject, arrCentPt, Array(0,t/4 – 50,sin(t)*5 )
End If
t = t+1
End If
n = n+1
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