26 February 2010

RH points counter labels01

A very useful rhinoscript for renaming array points with gradient color. Points are created by Grasshopper and it's very interesting see that the order of points is maintened, so you can select points in every manner and the order remains the original.

------------------------------------------------------------------
Option Explicit

'Script written by Davide del Giudice
'Script copyrighted by Co-de-iT www.co-de-it.com
'Script version Friday, 26 February 2010 11:40:04

Call Main()
Sub Main()

Dim arrobjects,count,strobjects,arrpt
Dim strDot
arrobjects=rhino.GetObjects("select points",1)

For Each strobjects In arrobjects

arrPt = rhino.pointCoordinates(strobjects)
count=count+1

strDot=Rhino.AddTextDot ("p."& count, arrPt)
Call Rhino.ObjectColor(strDot, RGB(count/5,count/10,count+5))
Next

End Sub
------------------------------------------------------------------

0 commenti: