本帖最后由 licml 于 2011-1-2 16:44 编辑
Dim strObject, arrPoint, dblParam,arrPt
strObject = Rhino.GetObject("Select a curve")
If Rhino.IsCurve(strObject) Then
arrPoint = Rhino.GetPointOnCurve(strObject, "Pick a test point")
If IsArray(arrPoint) Then
dblParam = Rhino.CurveClosestPoint(strObject, arrPoint)
arrPt=Rhino.CurveEvaluate(strObject,dblParam)
Rhino.AddPoint (arrPt)
'哪错了?为啥老报:array required,arrPt是array啊
Rhino.Print "Curve parameter: " & CStr(dblParam)
End If
End If
----第二段代码---------------------------------------------------
Dim strSrf
Dim arrPt1,arrPt2,arrContour,arrPoints
strSrf=Rhino.GetObject("select a srf:")
arrPt1=Rhino.GetPoint("Select first point")
arrPt2=Rhino.GetPoint("select second point")
arrContour=Rhino.SurfaceContourPoints (strSrf,arrPt1,arrPt2)
If IsArray(arrContour) Then
For Each arrPoints In arrContour
'为啥arrPoints是in arrContour,arrPoints没有赋值啊
rhino.AddCurve(arrPoints)
rhino.addpoints(arrPoints)
Next
End If
----------------------------------------
arrContour本身不就是点吗?why不能直接rhino.addpoints(arrContour)? |