According to the Manual Blender Python API, this operator is used to search for faces that are similar in area, material, perimeter, …
http://www.blender.org/api/blender_python_api_2_75_release/bmesh.ops.html#module-bmesh.ops
It is similar to the “bpy.ops.mesh.select_similar” but instead of selecting the faces, the “bmesh.ops.similar_faces” should return a dictionary with similar faces.
But how to make this possible?
Here’s the source code of the operator:
http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/source/blender/bmesh/operators/bmo_similar.c
Here’s the code I used to test 100 different combinations:
print('--------------------')
import bpy
import bmesh
mesh = bpy.context.object.data
bm = bmesh.from_edit_mesh(mesh)
#face = bm.select_history[0]
index = [0]
list = [bm.faces[i] for i in index]
test = 10
for type in range(test):
for compare in range(test):
dict = bmesh.ops.similar_faces(bm, faces = list,
type = type,
thresh = 0.0,
compare = compare
)
print(dict)
for f in bm.faces:
if f.select:
print(f.index)