0

我在 Ghpyhton 中编写了这段代码。它不会失败,但它不起作用。我可以按 istasyon 对 all_points 进行分组。但是,当您从红点获取距离并编写 VectorReverse 时,它​​不起作用。当它遇到红点时,我希望它向相反的方向移动。您还知道 MoveTo 命令的工作原理吗?如果你能帮忙,我会很高兴。

import rhinoscriptsyntax as rs

red=rs.coerce3dpoint(red_)
all_points=rs.coerce3dpoint(all_points_)
istasyon=rs.coerce3dpoint(istasyon_)

smaller=[] 
larger=[] 

for i in range(len(all_points)):
    distance = istasyon.DistanceTo(all_points) 

if distance > 10.00 :
    larger.append(i)  
elif distance < 8.00 :
    smaller.append(i)
 #print smaller
 #print larger

smaller_agents=[] 
for i in smaller:
    print i
    print all_points[i]

smaller_agents.append(all_points) 
print smaller_agents

point=[] for i in range(len(smaller_agents)):
    distance = rs.Distance(red,smaller_agents) 
    if distance < 8.00 :
        point = rs.vectorReverse([1,0,0]) 
print point
4

0 回答 0