walk関数の中身

for agt in agts:
    ptlist = []
    for pt in agt.trail:
        if len(ptlist) == 0:
            ptlist.append(pt)
        elif ptlist[-1].Equals(pt) == False:
            ptlist.append(pt)
    if len(ptlist)>1:
        pl = rs.AddPolyline(ptlist)                    
        pm = rs.CurveClosestPoint(pl,pos)
        pt = rs.EvaluateCurve(pl,pm)                    
        dist = pt.DistanceTo(pos)
        rs.DeleteObject(pl)
        if dist < 0.3:
            self.active = False 
            pos = pt
            break

Comments are closed.