function makeCurves() Dim crvOnePt1, crvOnePt2, crvOnePt3, crvOnePt4 'Define the variables for each point of curve one Dim crvTwoPt1, crvTwoPt2, crvTwoPt3, crvTwoPt4 'Define the variables for each point of curve two Dim crvOne, crvTwo 'Define variables for curves Dim LongCrv1, LongCrv2, LongCrv3, LongCrv4 'Create an array of points which will be used to define CrvOne crvOnePt1 = Array(0.0, 0.0, 10.0) 'create three floats that are the (X,Y,Z) values of the point crvOnePt2 = Array(4.0, 0.0, 5.0) crvOnePt3 = Array(8.0, 0.0, 5.0) crvOnePt4 = Array(12.0, 0.0, 25.0) 'Create an array of points which will be used to define CrvTwo crvTwoPt1 = Array(0.0, 50, 20) 'create three floats that are the (X,Y,Z) values of the point crvTwoPt2 = Array(4.0, 50, 12) crvTwoPt3 = Array(8.0, 50, 18) crvTwoPt4 = Array(12.0, 50, 17.0) 'Create an array of points which will be used to define CrvThree crvThreePt1 = Array(0.0, 75, 35.0) 'create three floats that are the (X,Y,Z) values of the point crvThreePt2 = Array(4.0, 75, 20.0) crvThreePt3 = Array(8.0, 75, 20.0) crvThreePt4 = Array(2.0, 75, 45.0) crvOne = Rhino.AddInterpCurve(Array(crvOnePt1, crvOnePt2, crvOnePt3, crvOnePt4)) 'Create first curve with array of points crvTwo = Rhino.AddInterpCurve(Array(crvTwoPt1, crvTwoPt2, crvTwoPt3, crvTwoPt4)) 'Create second curve with array of points crvThree = Rhino.AddInterpCurve(Array(crvThreePt1, crvThreePt2, crvThreePt3, crvThreePt4)) 'Create second curve with array of points 'Create 4 longitudinal curves that are built by 3 points defined above rhino.sleep 100 LongCrv1 = Rhino.AddInterpCurve (Array(crvOnePt1, crvTwoPt1, crvThreePt1), 2) rhino.sleep 100 LongCrv2 = Rhino.AddInterpCurve (Array(crvOnePt2, crvTwoPt2, crvThreePt2), 2) rhino.sleep 100 LongCrv3 = Rhino.AddInterpCurve (Array(crvOnePt3, crvTwoPt3, crvThreePt3), 2) rhino.sleep 100 LongCrv4 = Rhino.AddInterpCurve (Array(crvOnePt4, crvTwoPt4, crvThreePt4), 2) 'call makePoints1(LongCrv1) 'grabs the function makePoints1 to assign 11 points to LongCrv1 'call makePoints2(LongCrv2) 'grabs the function makePoints2 to assign 11 points to LongCrv2 'call makePoints3(LongCrv3) 'grabs the function makePoints3 to assign 11 points to LongCrv3 'call makePoints4(LongCrv4) 'grabs the function makePoints4 to assign 11 points to LongCrv4 'Calling makepoints with an array of curves call Makepoints (Array(LongCrv1, LongCrv2, LongCrv3, LongCrv4)) 'I DON'T UNDERSTAND!!!!!!!!!!!!!! end function 'The below function begins by createing 11 points evenly spaced along LongCrv1 through LongCrv4 'The function then grabs the first point on each of the 4 curves to generate a cross sectional 'curve. The function moves through a loop to grab successive sets of 4 points in order to build 'all of the cross sectional curves function MakePoints(crvArray) dim UpNum: UpNum = 25 'ultimately determines the number of cross sectional curves dim params dim Uval dim point redim crvPts(UBound(crvArray)) redim allPts(UBound(crvArray),UpNum) for i = 0 to UBound(crvArray) for j = 0 to UpNum params = rhino.curvedomain (crvArray(i)) Uval = ((params(1)-params(0))/(UpNum+2))*(j+1) point = rhino.evaluatecurve (crvArray(i),Uval) rhino.addpoint (point) allPts(i,j) = point rhino.sleep 100 next next for i = 0 to UpNum Redim ptsForCurve(UBound(crvArray)) for j = 0 to UBound(crvArray) ptsForCurve(j) = allPts(j,i) next Rhino.AddInterpCurve ptsForCurve rhino.sleep 100 next Rhino.Command ("ExtrudeCrv SelCrv " & "enter " & "-1") Rhino.Command ("SelCrv ") Rhino.UnselectObjects CrvArray Rhino.Command ("-loft t n " & "enter ") Rhino.UnselectAllObjects end function makeCurves ' 'function SrfBld LongCrv1, LongCrv2, LongCrv3, LongCrv4 'Rhino.Command ("SelCrv ") 'Rhino.UnselectObjects LongCrv1 'Rhino.Command ("loft ") 'end function 'Ubound returns a long value indicating the highest index-code in the array 'Rhino.curvedomain returns the domain of a curve object. You can get the domain 'size by using i.e. DomainSize = CrvDomain(1)-CrvDomain(0) '=================================================================