|
6m
楼主 |
发表于 2012-5-18 19:12:13
|
只看该作者
终于还是自己解决了。 唉
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 |
|