I'm trying to create a list that calculates the midpoints of a sequence of edges.
Right now I'm doing it like this:
eList = []
for e in [e for e in bm.edges if e.select]:
pt_1, pt_2 = (ob.matrix_world * e.verts[0].co), (ob.matrix_world * e.verts[1].co)
addPt = pt_1 + pt_2
co = mathutils.Vector((addPt[0]/2,addPt[1]/2,addPt[2]/2 ))
eList.append((e, co))
I multiply each vert in the edge by the object's world matrix, then add the verts together. I divide each axis in the vert by 2 and covert them to a vector and then put the edge and the vector in a tuple and append that to a list.
It's probably not a very efficient process but I'm still pretty new to python and can't think of a faster way.
Is this something that could be done faster in numpy?
What would be the fastest way to perform this function over a large sequence of edges?