|
本来想批量截图的,但是最后要按一下enter键很麻烦,求高人指点。
Option Explicit
'Script written by <insert name>
'Script copyrighted by <insert company name>
'Script version 2011年5月18日 12:42:18
Call Main()
Sub Main()
dim arrcurve:arrcurve=rhino.getobjects("curves",4,true,true)
dim i,c()
for i=0 to ubound(arrcurve)
rhino.UnselectAllObjects
rhino.SelectObject(arrcurve(i))
' rhino.Command("_offset"&"Distance<2>"&"BothSides"&"_enter")
redim preserve c(i)
' rhino.Sleep(100)
rhino.Command("_offset Distance 1 bothsides enter")
c(i)=Rhino.LastCreatedObjects
rhino.UnselectObject(arrcurve(i))
rhino.AddPlanarSrf(c(i) )
rhino.DeleteObjects(c(i))
'rhino.Command("_-ViewCaptureToFile enter" )
Dim filename
'filename=getRenderFileName("GrowSurface")
filename=Rhino.WorkingFolder & "\" & "scriptName" & i & ".jpg"
Rhino.Command "_-ViewCaptureToFile " & filename
Next
End Sub
程序是一段很简单的offsset运算 |
|