10 May 2010

(Cvs)Field 01


First exercize on parametric field generated from a curves. Original GH definition by E.Scripelliti.

RH control Points01

A rhinoscript that extracts control points form a curve and connects cps with a dashed polyline.
--
Option Explicit
'Script written by davide del giudice
'Script copyrighted by www.madeincalifornia.blogspot.com
'Script version Friday, 23 April 2010 15:17:58

Call circleOncp_multiplelines()
Sub circleOncp_multiplelines()
Dim arrplane,arrpoint,strdot,count,strobject,strlines,arrcircle

Dim arrobjects: arrObjects = Rhino.GetObjects("Select a curve",4)

For Each strobject In arrobjects

Dim arrpoints:arrPoints = Rhino.CurvePoints(strObject)

For Each arrPoint In arrPoints
count=count+1
Rhino.AddPoint arrpoint

arrplane = Rhino.PlaneFromFrame(arrpoint, Array(1.0,0.0,0.0), Array(0.0,1.0,0.0))
arrcircle= Rhino.AddCircle (arrPlane,5)
strDot=Rhino.AddTextDot (" "& count, arrPoint)
Call Rhino.ObjectColor(strDot, RGB(count*10,count*20,count*50))
Call Rhino.ObjectColor(arrcircle, RGB(count*10,count*20,count*50))

Next
strlines=rhino.addPolyline (arrpoints)
Rhino.ObjectLinetype strlines, "dashed"
Call rhino.ObjectColor(strlines,RGB(0,255,255))
Next

End Sub

Densification points on curve01



Quickly exercise about if,then else logic in Grasshopper. This definition creates points on curve with different densification depending on angle values from tangent on point and y vector at the same point.

27 April 2010

RH_rebuild Arcs /////////////////////////////////////////


This RhinoScript is very simple but useful to save time spended when we create flat drawing from rhino model with the command make2d, to compose sections or elevations and then export to Autocad.
This code reconstructs the curve that has many points in an arc by 3 points, so our drawing will be
much cleaner. For my drawing the error approximations is 0,05 cm, it depends from the scale of drawing and number of points on curves created after make2d command.

------------------------
Option Explicit
'Script written by davide del giudice
'Script copyrihted by www.co-de-it.com
'Please visit www.madeincalifornia.blogspot.com
'Script version Friday, 23 April 2010 15:17:58


Call rebuild_arcs()
Sub rebuild_arcs()
Dim arrpointstrobject,strobject, arrarcs,count

Dim arrobjects: arrObjects = Rhino.GetObjects("Select a curve",4)

For Each strobject In arrobjects

count=count+1

Dim arrPoint1:arrPoint1 = Rhino.CurveStartPoint(strObject)
Dim arrPoint2:arrPoint2 = Rhino.CurveEndPoint(strObject)
Dim arrpoint3:arrPoint3 = Rhino.CurveMidPoint(strObject)

arrarcs= Rhino.AddArc3Pt (arrpoint1, arrpoint2, arrpoint3)

Call Rhino.ObjectColor(arrarcs, RGB(0,255,255))
Call rhino.HideObject (strobject)
Call rhino.AddTextdot ("new arc"&"_"&count, arrpoint1)
'Call rhino.AddText ("new arc"&"_"&count, arrpoint1)
Next

End Sub

------------------------

26 April 2010

Blend Morphologies05/////////////////////////////////////////


Grasshopper Blend Morphologies applied to a skin design concept.

Blend Morphologies04/////////////////////////////////////////






Grasshopper Blend morphologies definition applied to a pavillion design concept.