090918-Geometry Study 1

section varied geometry

This one is trying to use different strength to control the sections of geometry so that have thin places and fat spaces 

Option Explicit
‘Script written by Shuang Xu

Call Main()
Sub Main()
 Dim strcurve,number,i,arrdivpt,radius
 strcurve=rhino.getobject(“curve”)
 number=rhino.getinteger(“number of division”,10)
 radius=rhino.GetReal(“radius”,15)
 arrdivpt=rhino.DivideCurve(strcurve,number)
 Dim arrparam(),arrnormal(),arrplane(),arrcircle()
 
 For i=0 To number
  ReDim Preserve arrparam(number)
  ReDim Preserve arrnormal(number)
  ReDim Preserve arrplane(number)
  ReDim Preserve arrcircle(number)
 
  arrparam(i)=rhino.CurveClosestPoint(strcurve,arrdivpt(i))
  arrnormal(i)=rhino.CurveCurvature(strcurve,arrparam(i))(1)
  arrplane(i)=rhino.PlaneFromNormal(arrdivpt(i),arrnormal(i))
  arrcircle(i)=rhino.AddCircle(arrplane(i),radius*rnd+0.5)
 Next
 
 Call rhino.addloftsrf(arrcircle)
End Sub

Then I apply it on a weaving-like geometry

5

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