筑梦NARUTO 的问题,原帖如下
http://bbs.rhino3d.asia/thread-23291-1-1.html
废话不多说,上代码:
- #coding=utf-8
- import rhinoscriptsyntax as rs
- listPoints = rs.GetObjects("选择干扰点", 1)
- listPointCd=[]
- for point in listPoints:
- listPointCd.append(rs.PointCoordinates(point))
- for i in rs.frange(0,40,1):
- for j in rs.frange(0,40,1):
- rs.EnableRedraw(False)
- if i%2==0:
- l=j+0.5
- else:
- l=j
- area = 15.0
- v = 20 / area
- center=[i,l,0]
- for listPointCd in listPoints:
- d = rs.Distance(center, listPointCd)
- if d < area :
- area = d
- listCircles=rs.AddCircle((i,l,0),0.03*area*v)
复制代码 [/hide]
|