(n)certainties – Columbia – Fall 2007

10/19/07_boatReorganizedByMovedObjects

axon_boatpulledapartvvtovgenal01.jpg

axon_boatpulledapartvvtovgenall02.jpg

Option Explicit
‘Script written by ben howell (w/Marc Fornes)
‘Script copyrighted by md+x (w/ Marc Fornes)
‘Script version Saturday, October 06, 2007 11:19:09 PM

Call Main()
Sub Main()

Dim arrMeshes : arrMeshes = rhino.getObjects(“pick boat parts”,32)

Dim intLow : intLow = 0
Dim intUp : intUp = 100

Dim arrVerticesNewOrigin()

Dim i
Dim n: n = 0

‘Rhino.EnableRedraw(False)
‘ ===========================
For i = 0 To UBound(arrMeshes)

‘Dim arrCentPt : arrCentPt = Rhino.MeshAreaCentroid(arrMesh)
Dim arrVertices : arrVertices = Rhino.MeshVertices(arrMeshes(i))

If IsArray(arrVertices) Then

If i > 0 Then

Dim arrMovedObject : arrMovedObject = Rhino.MoveObjects (array(arrMeshes(i)), arrVertices(0), array(i,0,0) )
‘Dim arrMovedObject : arrMovedObject = Rhino.MoveObjects (array(arrMeshes(i)), arrVertices(0), arrVerticesNewOrigin(i-1) )
‘Rhino.RotateObject arrMesh, newArrVertices(t), (dblDistance* (rnd()*10))

Dim arrVerticesMoved : arrVerticesMoved = Rhino.MeshVertices(arrMovedObject(0))
If isArray(arrVerticesMoved) Then
ReDim Preserve arrVerticesNewOrigin(i)
arrVerticesNewOrigin(i) = arrVerticesMoved(2)
n = n+1
End If

Else

ReDim Preserve arrVerticesNewOrigin(0)
arrVerticesNewOrigin(0) = arrVertices(0)

End If

End If
Next
‘ ===========================
‘ Rhino.EnableRedraw(True)
End Sub

Leave a Comment

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment