Dim strCurve,strStartPt,strParam,strTan,arrPlane,arrCircle,b,i,radius
radius=rhino.GetReal("input pipe radius:",1 )
strCurve=rhino.GetObjects("Select curves")
b=Ubound(strCurve)
For i = 0 To b
strStartPt=rhino.CurveStartPoint(strCurve(i))
strParam=rhino.CurveClosestPoint(strCurve(i),strStartPt)
arrPlane=rhino.CurvePerpFrame(strCurve(i),strParam)
'strTan=rhino.CurveTangent(strCurve(i),strParam)
'arrPlane=rhino.PlaneFromNormal(strStartPt,strTan)
arrCircle=rhino.AddCircle(arrPlane,radius)
rhino.addSweep1 strCurve(i),arrCircle
Next