I wrote this code in Ghpyhton. It does not fail, but it does not work. I can group all_points by istasyon. But it doesn't work when you take the distances from the red points and write VectorReverse. I want it to move in the opposite direction when it meets the red points. Do you also know how the MoveTo command works? I would be glad if you help.

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
0

There are 0 answers