This is the original v.0.1 script. It will eventually crash if the original curve is very intricate (the curves created by the script will become shorter than the tolerance returning a “string required” error…
Anyway, here is the code:
Option Explicit
‘Script written by Ado
Call Main()
Sub Main()
Dim arrStartPt()
ReDim Preserve arrStartPt(0)
arrStartPt(0) = Rhino.GetPoint (“select start point”)
Dim strCrv : strCrv = Rhino.GetObject (“select boundary curve”, 4)
Dim i, j, l, arrNewPt, strTempLn, arrCCX, arrNewTempPt, strNewLine, dblCrvLength
Dim dblAngle : dblAngle = 10
Dim k : k = 10
For j = 1 To 100
ReDim Preserve arrStartPt(j)
arrNewPt = Rhino.Polar (arrStartPt(j-1), k, 10000)
strTempLn = Rhino.addLine (arrStartPt(j-1),arrNewPt)
arrCCX = Rhino.CurveCurveIntersection (strTempLn, strCrv)
If arrCCX(i,0) = 1 Then
arrNewTempPt = arrCCX(0,1)
End If
Call Rhino.DeleteObject (strTempLn)
strNewLine = Rhino.AddLine (arrStartPt(j-1),arrNewTempPt)
dblCrvLength = Rhino.CurveLength (strNewLine)
k = k + (134 – dblCrvLength)
strNewLine = Rhino.ScaleObject (strNewLine,arrStartPt(j-1),array(0.9,0.9,0.9))
arrStartPt(j) = rhino.CurveEndPoint (strNewLine)
Next
Dim arrNewStartPt()
For l = 0 To UBound(arrStartPt)
ReDim Preserve arrNewStartPt(l)
arrNewStartPt(l) = array(arrStartPt(l)(0),arrStartPt(l)(1),arrStartPt(l)(2)+(l*10))
Next
Call Rhino.AddCurve (arrNewStartPt)
End Sub
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.