import bpyimport bmeshfrom math import pi, radians, degreescud = bpy.data.objects['Cube'].dataspace = bpy.data.objects['Cube'].matrix_localbm = bmesh.from_edit_mesh(cud)print(len(bm.verts))e0 = bm.edges[0]e0v0 = e0.verts[0]e0v1 = e0.verts[1]midpoint = (e0v0.co+e0v1.co) * 0.5print("************ midpoint = ",midpoint)#OK (-1,-1,0)print(e0v0,e0v1) #0 4 OK!loop = e0.link_loopsprint(loop[:])#print(dir(e0))f0 = loop[0].faceprint(f0)#print(dir(loop[0]))print(f0.normal)f3 = loop[1].faceprint(f3.normal)axis = f0.normal + f3.normalprint(f0.normal + f3.normal)#bmesh.ops.spin(bm, geom, cent, axis, dvec, angle, space, steps, use_duplicate)res = bmesh.ops.spin(bm, geom=[e0v0], cent = midpoint, axis = axis, dvec = (0,0,0), angle = radians(180), space = space, steps = 4, use_duplicate = False)print(res)