写个小代码就可以实现了
帮你作成一小按钮
安装方法就是直接 "重量.rui" 拖入犀牛
重量.rar
(8.06 KB, 下载次数: 131)
原代码
[Visual Basic] 纯文本查看 复制代码 Sub Main()
Const rhObjectPolySurface = 16
Dim strObject, arrMP
strObject = Rhino.GetObject("请选择封闭多重曲面", rhObjectPolySurface)
If Rhino.IsPolySurfaceClosed(strObject) Then
arrMP = Rhino.SurfaceVolume(strObject)
If IsArray(arrMP) Then
Rhino.Print "体积: " & CStr(arrMP(0))
Rhino.Print "黄金重量: " & CStr(arrMP(0) * 19.32)
Rhino.Print "白金重量: " & CStr(arrMP(0) * 21.45)
Rhino.Print "银重量: " & CStr(arrMP(0) * 10.5020)
End If
End If
End Sub
Main
|