1 Function PullCurveToSurface(strSurfaceID, strCurveID) 
2 Dim arrCP, arrKnots, arrWeights 
3 Dim intDegree, i 
4 Dim arrNewPt, strNewID 
56 
arrCP = Rhino.CurvePoints(strCurveID) 
7 arrKnots = Rhino.CurveKnots(strCurveID) 
8 arrWeights = Rhino.CurveWeights(strCurveID) 
9 intDegree = Rhino.CurveDegree(strCurveID) 
10 
11 For i = 0 To UBound(arrCP) 
12 arrNewPt = Rhino.BrepClosestPoint(strSurfaceID, arrCP(i)) 
13 arrCP(i) = arrNewPt(0) 
14 Next 
15 
16 strNewID = Rhino.AddNurbsCurve(arrCP, arrKnots, _ 
17 intDegree, arrWeights) 
18 Rhino.DeleteObject strCurveID 
19 
20 PullCurveToSurface = strNewID 
21 End Function 
Line 6-9: Extract all required properties from the existing curve 
Line 12: Find the closest point on the surface for every control point 
Line 13: Replace the coordinates of the control point with the coordinates of the 
closest point 
Line 16: Create a new curve from the adjusted data 
Line 20: Set the function return value to match the identifier of the new curve object 
 
但是有時又不是 返回一個 BLN 值 
 
我想問 什麼時候 用BLN 值   又什麼時候 用其他的呢 ~ |