Hi everyone,
I wrote a Rhino Python script which creates a Lasso selection from a List in Python.
Here is the Function:
def lassoselection (ptlst):
for i in range(0,len(ptlst)):
if i == 0:
cmd = "_Lasso "
cmd = cmd+str(ptlst[i][0])+","+str(ptlst[i][1])+","+str(ptlst[i][2])+ " "
elif i == len(ptlst)-1:
cmd = cmd+str(ptlst[i][0])+","+str(ptlst[i][1])+","+str(ptlst[i][2])
cmd = (cmd + " _Enter")
else:
cmd = cmd+str(ptlst[i][0])+","+str(ptlst[i][1])+","+str(ptlst[i][2])+ " "
rs.Command(cmd)
My code to run the function is:
Where the value of lmeshmoved[meshboundaryVert[0][0]][0] is -225.577453613.
ptlist = [[-165,90,0], [-120,11,0], [-165,-50,0]]
newEdge1 = copy.copy(ptlist[len(ptlist)-1])
newEdge1 [0] = lmeshmoved[meshboundaryVert[0][0]][0] -25
ptlist.append(newEdge1)
newEdge2 = copy.copy(ptlist[0])
newEdge2 [0] = lmeshmoved[meshboundaryVert[0][0]][0] -25
ptlist.append(newEdge2)
lassoselection(ptlist)
Here are example pictures:
This automated Selection especially fails after leaving rhino open but not working for a while.
Is this a known bug? Has anyone any idea? It fails with a probability of about 20 %.
Thanks a lot. This is a great Forum, I have learned a lot here, now I am newly registered.
Cheers
Benjamin