|
本帖最后由 1235813 于 2011-1-3 18:16 编辑
Option Explicit
Call Main()
Sub Main()
dim srfs
dim p()
srfs=rhino.GetObjects("planar surfaces",8,true,true)
dim j
call rhino.EnableRedraw(false)
for j=0 to ubound(srfs)
dim srf
srf=srfs(j)
'dim p
'p=rhino.surfacepoints(srf)
dim c
dim c1
c=rhino.duplicatesurfaceborder(srf)
c1=rhino.explodecurves(c)
dim i,n
n=ubound(c1)
redim p(n)
for i=0 to ubound(c1)
p(i)=rhino.CurveStartPoint(c1(i))
Next
dim pointscount
pointscount=ubound(p)+1
redim preserve p(pointscount)
p(pointscount)=p(0)
'call rhino.addpoints(p)
'dim i,j
'j=0
'for each i in p
'call rhino.addtext(j,i)
'j=j+1
'Next
dim c2,srf2
c2=rhino.AddCurve(p,3)
srf2=rhino.AddPlanarSrf(c2)
call rhino.BooleanDifference(srf,srf2)
call rhino.DeleteObjects(c)
call rhino.DeleteObjects(c1)
call rhino.DeleteObject(c2)
next
call rhino.EnableRedraw(true)
End Sub
好像需要rhino5.0支持
|
评分
-
查看全部评分
|