[Python] 纯文本查看 复制代码
#coding=utf-8
import Rhino.Geometry as rg
import Rhino as r
import rhinoscriptsyntax as rs
import scriptcontext as sc
object=rs.GetObject ("选择物体", 16)
geometry=sc.doc.Objects.FindGeometry(object)
point1=rs.Str2Pt("0,5,0")
point2=rs.Str2Pt("0,-5,0")
taper=rg.Morphs.TaperSpaceMorph(point1,point2,1,2,False,False)
taper.PreserveStructure= False
taper.QuickPreview =False
morph=taper.Morph(geometry)
print morph
if morph:
sc.doc.Objects.AddBrep(taper)
sc.doc.Views.Redraw()
[AppleScript] 纯文本查看 复制代码
#coding=utf-8
import Rhino.Geometry as rg
import Rhino as r
import rhinoscriptsyntax as rs
import scriptcontext as sc
object=rs.GetObject ("选择物体", 16)
geometry=sc.doc.Objects.FindGeometry(object)
point1=rs.Str2Pt("0,5,0")
point2=rs.Str2Pt("0,-5,0")
taper=rg.Morphs.TaperSpaceMorph(point1,point2,1,2,False,False)
taper.PreserveStructure= False
taper.QuickPreview =False
morph=taper.Morph(geometry)
print morph
if morph:
sc.doc.Objects.AddBrep(geometry)
sc.doc.Views.Redraw()