Option Explicit 'Script written by Russell Loveridge 'Script copyrighted by RAL:lapa.epfl.ch 'This script shows the difference between the AddCurve and AddInterpCurve commands. Call Makepolyline() Sub Makepolyline() Dim arrPolyline(), arrPt Dim intPolyPoints, i, intInterpolated Dim strPoly1 intPolyPoints = Rhino.GetInteger("How many points do you want on your polyline?", 6, 2 ) ' minimum number of points 2, no maximum. intInterpolated = Rhino.GetInteger("Should the curve be interpolated Yes=1, No = 0, Show both=2", 2, 0, 2 ) ' An interpolated curve passes THROUGH the input points. ' A NON-interpolated curve uses the input points as the CONTROL POINTS of a spline, and the line may not pass through them!!! For i=0 To (intPolyPoints-1) 'This is a loop that makes all of the calculations for the points o the polyline. ReDim Preserve arrPolyline(i) ' This command allows you to change the number of points in an array dynamically. arrPt = Rhino.GetPoint("Pick a point " & i & ":") ' this asks the user to click points on the screen. arrPolyline(i) = arrPt ' this line combines all of the clicked points into an array. Next If IsArray(arrPolyline) Then If intInterpolated = 1 Then strPoly1 = Rhino.AddInterpCurve (arrPolyline) ' this line creates a polyline based on the array of chosen points. ElseIf intInterpolated = 9 Then strPoly1 = Rhino.AddCurve (arrPolyline) ' as the default for Add curve is a degree 3 spline, anything other than degree 1 will be a curve. Else Rhino.AddCurve (arrPolyline) Rhino.AddInterpCurve (arrPolyline) End If End If ' if you need to understand further, once completed select the two lines and turn on thier CONTROL POINTS... ' the difference should become clear. End Sub