Exploring forms with Rhinoscript Pablo C. Herrera
IAP, MIT. Jan 23, 2006 Computational Design Solutions - Part I Rhinoceros Visual Basics Instructors: Kenfield Griffith, John Snavely
Goals •Is Is it possible to explore ideas and new designs using scripts? Or scripting is only for programmers •Rhino Rhino is not a parametric software. But is it possible to make our non Euclidean form parametric through scripting? •Is Is it possible make a sequence of script with all the information needed to print the model?
Point Line
Solid
Surface
Point 'Create array of points crvOnePt1 = Array(0.0, 0.0, 10.0) crvOnePt2 = Array(4.0, 0.0, 10.0) crvOnePt3 = Array(8.0, 0.0, 10.0) crvOnePt4 = Array(12.0, 0.0, 10.0)
Lines crvOne = Rhino.AddInterpCurve (Array(crvOnePt1, crvOnePt2, crvOnePt3, crvOnePt4))
Surface curveArray = Array(crvOne, crvTwo, crvThree, crvFour) srfArray(0) = Rhino.AddEdgeSrf (curveArray)
Solid For i = 0 To UBound(srfArray) Rhino.SelectObject(srfArray(i)) Rhino.UnSelectObject(srfArray(i)) If i = 0 Then newPoint(0) = crvFiveEndPoint(0) newPoint(1) = crvFiveEndPoint(1) newPoint(2) = crvFiveEndPoint(2)-1 path = Rhino.AddLine (crvFiveEndPoint,newPoint) Rhino.ExtrudeSurface srfArray(i),path Rhino.DeleteObject (path)
Sketch using script
1 Joint two lines with a surface and exploring different alternatives
2
3
Exploring alternatives
4
5
6
Exploring alternatives
7
8
9
10
Exploring alternatives
Exploring alternatives
•Is Is possible explore ideas and new designs using scripting or only is for programmers?
‌Yes, it is for all
•Is Is it possible to explore ideas and new designs using scripts? Or scripting is only for programmers •Rhino Rhino is not a parametric software. But is it possible to make our non Euclidean form parametric through scripting? •Is Is it possible make a sequence of script with all the information needed to print the model?
The script
You have the control of each element in a line of code all the time
Digital Model
vs
Script 1 Kb
35 Kb 5 Kb 572 Kb
12 Kb 1132 Kb
Your file is very small
•Is Is it possible to explore ideas and new designs using scripts? Or scripting is only for programmers •Rhino Rhino is not a parametric software. But is it possible to make our non Euclidean form parametric through scripting? •Is Is it possible make a sequence of script with all the information needed to print the model?
Yes, it is.