Option Explicit
‘Script copyrighted by ben howell
Call Main()
Sub Main()
Const rhObjectMesh = 32
Dim strObject, arrVertices, arrVert, strObjPt, arrMeshes
Dim arrObjects
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
Dim n : n = 0
Dim x
For x = 0 To 1
ReDim Preserve newArrVertices(n)
ReDim Preserve newstrObj(n)
newArrVertices(n) = arrVertices(n)
Rhino.AddPoint(arrVertices(n))
dblDistance = Rhino.Distance(newArrVertices(n),arrCentPt)
‘Rhino.Print dblDistance
Rhino.RotateObject strObject, newArrVertices(0), (dblDistance* (rnd()*10))
n = n + 1
Next
End If
Next
End Sub
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.