经过努力,已经把前问题解决。
Call xialiaokuang()
Sub xialiaokuang()
Dim strObject, spt01,ept01,i,h,x,y
strObject = Rhino.GetObjects("Select curves",4,True,True)
If isnull(strObject) Then Exit Sub
For Each i In strObject
spt01 = Rhino.CurveStartPoint(strObject(h))
ept01 = Rhino.CurveEndPoint(strObject(h))
Rhino.AddPoint spt01
Rhino.AddPoint ept01
h=h+1
Next
End Sub
Call xialiaokuang()
Sub xialiaokuang()
Dim strObject, spt01,ept01,i,h,j,points,arrPoints,arr,p
h = 0
j = 0
strObject = Rhino.GetObjects("Select curves",4,True,True)
If isnull(strObject) Then Exit Sub
Dim array01()
Dim array02()
For Each i In strObject
spt01 = Rhino.CurveStartPoint(strObject(h))
ept01 = Rhino.CurveEndPoint(strObject(h))
h=h+1
ReDim Preserve array01(j)
array01(j)= spt01
ReDim Preserve array02(j)
array02(j)= ept01
j=j+1
Next
arr = Rhino.SortPoints(array01)
For Each p in arr
Rhino.Print Rhino.Pt2Str(p)
Next
End Sub