python 犀牛脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 犀牛脚本相关的知识,希望对你有一定的参考价值。

#--- Make Layers --- 
#https://discourse.mcneel.com/t/creating-sublayers-with-python/55948/2
#https://developer.rhino3d.com/samples/rhinocommon/add-layer/
import rhinoscriptsyntax as rs

def TestAddSubLayers():
    parent_layer="MainLayer"
    if not rs.IsLayer(parent_layer): rs.AddLayer(parent_layer)
    sublayernames = ["Layer1", "Layer2", "Layer3"]
    Colors = [(255,0,0), (0,255,0), (0,255,255)]
    for i in range(len(sublayernames)):
        # Color is also directly specifiable
        rs.AddLayer(sublayernames[i],color=Colors[i],parent=parent_layer)
TestAddSubLayers()
#--- Make Layers End ---

以上是关于python 犀牛脚本的主要内容,如果未能解决你的问题,请参考以下文章

rhino(犀牛)指令栏

犀牛初级,中级,高级视频教程 犀牛教程

犀牛文件可以导入到compass软件里吗?

解决方案Yunxion资产跟踪设备助力犀牛的安全保护

求分享rhino(犀牛)7.0注册机

犀牛怎么导出文泰 ac6