本帖最后由 筑梦NARUTO 于 2017-9-28 21:43 编辑
前段时间有人在群里问,Rhino如何选择自相交曲线,分享一个简单的代码。有兴趣的可以试试
[AppleScript] 纯文本查看 复制代码 #coding=utf-8
#Author:月之眼 E-mail:[url=mailto:naruto@n-dda.cn]naruto@n-dda.cn[/url]
import rhinoscriptsyntax as rs
import scriptcontext as sc
#自定义选择类型
def select_CurveXSelf(rhino_objects, geometry, geometry_index):
list = rs.CurveCurveIntersection(geometry)
return (list!=None)and(list[0]==Overlap)
def commond():
geometrys = rs.GetObjects("选择自相交曲线",rs.filter.curve,True,True,custom_filter = select_CurveXSelf)
return geometrys
if __name__=="__main__":
commond()
|