Sunday, June 15, 2008

Rhinoceros just simply rocks!

When I set up my files recently to CNC rout the plywood profiles for my latest project I made the newbie error of drawing the outside diameter of the holes I needed drilled rather than the center points (it makes sense after the fact but was counter-intuitive for someone more used to RP than CNC). Anyway, after manually drawing all the center points I asked the good folks at McNeel if there was a simpler way to bulk insert these points. Pascal Golay just sent me this Rhinoscript:

'*****************************
'*****************************

Option Explicit
Call Main()
Sub Main()
Dim aCircles
aCircles = Rhino.GetObjects("Select circles",4,True,True)
If Not isArray(aCircles) Then Exit Sub
Dim sCircle,aPt
Rhino.EnableRedraw(False)
For Each sCircle In aCircles
If Rhino.IsCircle(sCircle) Then
aPt = Rhino.CircleCenterPoint(sCircle)Rhino.AddPoint aPt
End If
Next
Rhino.EnableRedraw(True)
End Sub

'*****************************
'*****************************

It works a charm. Since I've recently been working with Processing and Arduino - I actually sort of understand it, too. I was inspired to put in the effort to get over the inevitable learning curve with Rhinoscripting when I saw THEVERYMANY - this just makes it all the more so. For all those (like me) that are intimidated by code, I think this is a significant move:

Grasshopper™ - a graphical algorithm editor tightly integrated with Rhino’s 3-D modeling tools. Unlike RhinoScript, Grasshopper requires no knowledge of programming or scripting, but still allows designers to build form generators — from the simple to the awe-inspiring.

No comments:

Blog Archive

My Portfolio

John Marshall Portfolio

My Linkedin Profile

View John Marshall's profile on LinkedIn

rootoftwo's shared items

About

I am exploring a hybrid form of art and design practice through the use of computer-based design and fabrication tools. I am interested in experimental objects and spaces that are dynamic and responsive and seek to challenge perceptions, expectations and established behavior.

Creative Commons

My del.icio.us

Site Meter