from maya import cmds
def find_edges_between(input_edges=None, summery_axis='x'):
'''
Given an list of edges on one side of a mesh this function finds the edges on the same loop that are between
the input edge(s) and a symetrical set of edges. This function is not dependant on edge indices
:param input_edges A lsit of at least one edge on one side of a mesh.
:param summery_axis The symmerty axsis in object space NOT world space.
:returns List of the edges in between
'''
if not input_edges:
edge_set_1 = cmds.ls(sl=True, fl=True)
else:
cmds.select(input_edges, r=True)
edge_set_1 = cmds.ls(sl=True, fl=True)
cmds.symmetricModelling(about='object', axis=summery_axis, s=1)
cmds.select(edge_set_1, symmetry=True, r=True)
edge_set_2 = [e for e in cmds.ls(sl=True, fl=True) if e not in edge_set_1]
cmds.symmetricModelling(s=0)
edge_1 = int(edge_set_1[0].split('[')[-1].split(']')[0])
edge_2 = int(edge_set_2[0].split('[')[-1].split(']')[0])
between_edges = [e for e in cmds.polySelect(edgeLoopPath=(edge_1, edge_2), ass=True, ns=True)
if e not in edge_set_1 and e not in edge_set_2]
print(between_edges)
return between_edges