pseudo script

Option Explicit

Call Network()
Call Circles()
Sub Network()
‘list variables
Dim arrStrAttractors : arrStrAttractors = Rhino.GetObjects (“select attractors”,1)
ReDim arrAttractors(UBound(arrStrAttractors ))
For Each strAttractor In arrStrAttractors
arrAttractors(k) = Rhino.pointcoordinates (strAttractor)
‘set initial values
stLocation = Rhino.GetPoint (“Select your start points”)
For i = 2 To ‘# of generations
For l=0 To UBound(startpoints)
For Each arrAttractor In arrAttractors
testDistance = Rhino.Distance (startpoint, arrAttractor)
If testDistance < dblDistance Then
dblDistance = testDistance
buildpoint = startpoint
‘if distance is 0 go to next closest
End If
‘construct New lines And points based On build point
buildpoint1 = Rhino.Polar (buildpoint, 45, crvL)
curve = Rhino.AddLine (buildpoint, buildpoint2)
buildpoint3 = rhino.CurveEndPoint (str2Crv)
‘add the new endpoint to attractor list
‘and add the new point to build point array
‘pipe all
End Sub

Sub Circles()
‘select all points
‘find density of points
‘for i = 0  to Ubound # of points
‘add circle with a radius based on density
‘for i = 0 to ubound # of cirles
‘trim and fillet all circles
‘join all lines
End Sub


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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