Saturday, March 17, 2007

dim.strP_rdl v.01

implementing the same presvous logic into skyscaper generation script. the cell geometry of previous sample was rationalized into 3d box. two cells for every face. very box of 1:3 relation was divided by four plans generating three identical cube. every plans rotate progressivly of 120° degree. in this way i was able to repeat the box, growing the tower at the wished height and preserving continuity between floors. i'm also working more generally on tower generator scripts. ....to be updated....

'''''''''''''''''''''''''''''''''''''''
Sub crtplan

Dim IntFloorNumber
Dim IntFloorHeight
Dim DblFloorRotation
Dim arrObjects
Dim i

IntFloorNumber = Rhino.GetReal ("number of floors", 10, 2, 100)
IntFloorHeight = Rhino.GetReal ("height of floors", 4, 3, 6)
DblFloorRotation = Rhino.GetReal ("rotation of floors", 30, 0, 359)
arrObjects = Rhino.GetObjects("Select planar curve as a tower base plan", 4)
axispoint = Rhino.CurveAreaCentroid (arrObjects)

'Dim arrPlnSrf

'If IsArray(arrObjects) Then
'arrPlnSrf = Rhino.AddPlanarSrf (arrObjects)
'End If


''''copy floors

Dim arraystart
Dim arrayend
Dim intLevel
Dim arrCrv
Dim axispoint
For i = 1 To intFloorNumber
intLevel = IntFloorHeight * i
arraystart = Array(0, 0, i)
arrayend = Array(0, 0, intLevel)
arrCrv = Rhino.CopyObjects (arrObjects, arraystart, arrayend)

'''''''''''''''''''''''''''''''''''''''
workinprogress

0 comments: