'MAKING A BRIDGE FROM TWO CURVES '================================================================= 'You are responsible for creating a bridge using the curves below 'The points that create the curves can be manipulated for variance 'in bridge curvature '================================================================= '=======MAKECURVES FUNCTION======================================= 'This function creates two curves from points as paramaters 'the location of points can be manipulated for creating different 'bridge results '================================================================= function makeCurves() 'curves will be created from 4 points 'you are welcome to add more points for creating different 'types of curves, but the minimum should be 4 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 'Create array of points 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, 10.0) crvOnePt3 = Array(8.0, 0.0, 10.0) crvOnePt4 = Array(12.0, 0.0, 10.0) crvTwoPt1 = Array(0.0, 50, 10.0) 'create three floats that are the (X,Y,Z) values of the point crvTwoPt2 = Array(4.0, 50, 10.0) crvTwoPt3 = Array(8.0, 50, 10.0) crvTwoPt4 = Array(12.0, 50, 10.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 'Use the built curves to build bridge call makeBridge(crvOne, crvTwo) end function '**************************************** '===== FUNCTION FOR YOU TO CODE ========= '**************************************** '=======MAKEBRIDGE FUNCTION======================================= 'This function uses the two curves from above function to build 'your bridge '================================================================= function makeBridge(c1, c2) dim i dim length for i=0 to 5 length=(50/5)*i dim s s=Rhino.ExtrudeCurveStraight (c1, array(0,0,10), array(0,0,5)) call rhino.copyobjects(array(s),array(0,0,10),array(0,length,10)) next dim j dim width for j=0 to 2 width=4*j dim z dim breadth for z=0 to 4 breadth=(50/5)*z dim t t=rhino.AddSrfPt(array(array(0.0,0.0,10.0),array(0.0,10,10.0),array(4.0,10,10.0),array(4.0,0.0,10.0))) m=rhino.copyobjects(array(t),array(0,0,10),array(width,breadth,10)) next next 'In this function body you will be responsible for using the 'two curves c1 and c2 above which are passed as parameters 'to build your bridge 'you are allowed to use as many helper functions as necessary 'Concentrate on keeping your solution simple in the beginning 'you are welcome to elaborate on your design after you have something 'working end function makeCurves '(0.0,0.0,10.0),(0.0,10.0,10.0),(4.0,10.0,10.0),(4.0,0.0,10.0)