|
本帖最后由 1235813 于 2011-5-18 13:43 编辑
这是一段offset命令的批处理代码
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))
Next
End Sub
|
|