- #coding=utf-8
- #Author:月之眼 E-mail:naruto@n-dda.cn
- import rhinoscriptsyntax as rs
- import scriptcontext as sc
- import Rhino.Geometry as rg
- #custom_filter
- def select_CurveXSelf(rhino_objects, geometry, geometry_index):
- list = rs.CurveCurveIntersection(geometry)
- return (list!=None)and(list[0]==Overlap)
- def commond():
- geometrys = rs.GetObjects("Select self intersecting curves",rs.filter.curve,True,True,custom_filter = select_CurveXSelf)
- color = rs.GetColor(0)
- if geometrys and color:
- [rs.ObjectColor(i,color) for i in geometrys]
- if __name__=="__main__":
- commond()
复制代码 |