Option Explicit
‘Script written by Macus Chen
‘Script copyrighted by <insert company name>
‘Script version Thursday, December 10, 2009 1:55:02 PM

Call Main()
Sub Main()

Dim meshes
meshes = rhino.GetObjects(“get a mesh”,32)

Dim i, j, vertices, faces, newVertices(), newMesh, newPt
For i = 0 To Ubound(meshes)

vertices = Rhino.MeshVertices (meshes(i))

faces = Rhino.MeshFaceVertices(meshes(i))

For j = 0 To Ubound(vertices)

vertices(j)(0) = vertices(j)(0) + rnd*1-0.05
vertices(j)(1) = vertices(j)(1) + rnd*1-0.05
vertices(j)(2) = vertices(j)(2) + rnd*1-0.05

newPt = array(vertices(j)(0),vertices(j)(1),vertices(j)(2))
vertices(j) = newPt


newMesh = rhino.AddMesh(vertices,faces)


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