# Select faces inside selected edges?

How could I do this with bmesh maybe? I need to select faces inside selected edges. This works only 50% of the time and I need it to work 100%.

I'm currently selecting the weighted edges then doing this.

bpy.ops.mesh.loop_to_region(select_bigger=False)


Sometimes the selection is inverted and it has to be

bpy.ops.mesh.loop_to_region(select_bigger=True)


or it even selects random parts.