Option Explicit ‘Script written by ‘Script copyrighted by ‘Script version Sunday, June 08, 2008 1:19:49 AM Call Main() Sub Main() Dim crv: crv = Rhino.GetObjects(“Select Curves”,4) If isNull(crv) Then Exit Sub Dim arrItems, arrValues, arrResults arrItems = array(“scale_width”,”twist_angle”,”tip_location”,”tip_angle”,”start_width”,”end_width”,”tip_length”,”type_(1)or(2)”,”curved arrows”) arrValues = array(1,0,.95,45,.2,.5,1,1,True) arrResults = Rhino.PropertyListBox (arrItems, arrValues ,,”Arrow Parameters”) Dim i If arrResults(0) .99 Then [...]
Archive for the ‘misc’ Category
misc.documentation.arrows.01
March.5.2010
misc.rotating vase.01
March.28.2009
Option Explicit ‘Script written by HyunChang Cho ‘Script copyrighted by team H ‘Script version Tuesday, October 28, 2008 10:34:18 PM Call Cleareverything() Call Main() Sub Main() Dim arrPlane, i, j, strCrv(), strInnerCrv(), strSrf1, strSrf2, arrLftSrf1, arrLftSrf2, arrLftSrf3 For j = 0 To 5 For i = 0 To 10 ReDim Preserve strCrv(i) ReDim Preserve strInnerCrv(i) [...]
misc.shards.01
March.28.2009
Option Explicit ‘Script written by ‘Script copyrighted by ‘Script version Sunday, December 07, 2008 4:41:24 PM Call Main() Sub Main() Dim i,j,k,l,m, arrPt, strPoint, strTestPath, arrPoint, arrCCX, strCurve, counter, arrIntPoint(), strIntPoint, strCrv, strCrv2, strSrf Dim arrIntPt, TestDistance, OrigDistance, ClosestPoint, strPath, arrDivPts, arrPoint1, arrPoint2, strIntLine(), closestLine Dim arrPoints : arrPoints = Rhino.Getobjects (”select Points”, 1) Dim [...]
misc.compounded errors.01
March.27.2009
Option Explicit ‘Script written by Call Main() Sub Main() Dim strObject, gens ‘ user input gens = rhino.GetReal(“how many gens”, 20) strObject = Rhino.GetObject(“Select object to copy”) Rhino.CopyObject strObject ‘ call the function moveGrips strObject, gens strObject = Rhino.FirstObject() End Sub Function moveGrips (strObject, gens) Dim arrPts, arrNewPts, newArrPts(), i, point, strObject0 ‘pointArray ‘strObject = [...]
misc.cyclone.01
March.26.2009
‘Script written by ‘Script copyrighted by ‘Script version Friday, April 06, 2007 10:26:45 PM Option Explicit Dim arrcomp2 : arrcomp2 = Rhino.GetObject (”pick contour point”, 1) Dim arrcomply : arrcomply = Rhino.ObjectLayer (arrcomp2) Dim arrcvs : arrcvs = Rhino.ObjectsByLayer(arrcomply) Dim arrbound1 : arrbound1 = Rhino.GetObject(”pick centroid”,1) Dim arrboundcord1 : arrboundcord1 = Rhino.PointCoordinates(arrbound1) Dim arrcomp : [...]
misc.select length.01
March.26.2009
Option Explicit ‘—————————————————————————— ‘ Subroutine: selectLength ‘ Purpose: selects curves based on minimum length ‘ Author: Roland Snooks | 2006 | www.kokkugia.com ‘—————————————————————————— Sub selectLength ‘array Dim arrCurves, arrSuccess(), dblDistance, blLength, i, dblSuccessCount, dblLength ‘ input arrCurves = Rhino.GetObjects(“pick curves to test”, 4) dblDistance = Rhino.GetReal(“minimum length”, 1, 0) Rhino.UnselectAllObjects dblSuccessCount = 0 ‘ loop [...]
misc.area calc.01
March.26.2009
Option Explicit main() Sub main() Dim arrObjects arrObjects = Rhino.GetObjects (“select a objects”, 8) Dim i For i = 0 To UBound(arrObjects) If Rhino.IsSurface(arrObjects(i)) Then Dim arrArea : arrArea = Rhino.SurfaceArea(arrObjects(i)) Dim arrPoints : arrPoints = Rhino.SurfacePoints(arrObjects(i)) Rhino.AddText “Panel “& i+1 & ” Area: ” & CStr (arrArea(0)), arrPoints(0) End If Next End Sub
misc.curve2length.01
March.26.2009
Option Explicit ‘title: FitCurveToLength ‘this script is to loop scaling a curve until it fits certain length FitCurveToLength () Sub FitCurveToLength () Dim strCurveID strcurveID = Rhino.GetObject(“Select a curve to fit to length”, 4, True, True) If IsNull(strCurveID) Then Exit Sub Dim dblLength dblLength = Rhino.CurveLength(strCurveID) Dim dblLengthLimit dblLengthLimit = Rhino.GetReal(“Length limit”, 0.5*dblLength, 0.01*dblLength, dblLength) [...]
misc.wind manipulation.01
March.26.2009
Saturday, September 15, 2007 pariSSSS, france Option Explicit ‘base floor curve from points’ Call DrawCurve Sub DrawCurve Dim r Dim bulgefactor Dim i Dim j Dim arrpt1, arrpt2, arrpt3, arrpt4, arrpt5, arrpt6, arrpt7, arrpt8, arrpt9, arrpt10, arrpt11, arrpt12 Dim arrpts Dim arrcrvpts Dim crv1 bulgefactor= Rhino.getreal (“choose bulge ratio”) r= 1.0477787091366303436714165968148*Rhino.getreal (“identify RADIUS”, 1,0) i= [...]
misc.flower.01
March.26.2009
Tuesday, February 5, 2008 Something Flowerly Recent progress in rvb. As it’s explained in script, 1. create sphere in spiral, and scale accordingly 2. draw 2d line, rotate, and move 3. rotate sphere in 3D thats all. Enjoy. Option Explicit addVector() Sub addVector() Dim arrCoordinate(2), arrPoint(), arrSphere(), arrScaleSphere() Dim arrLine(), arrSt(2), arrEd(2), arrRotateLine(), dblAngle Dim [...]