add option to select face by matching number of sides.

This commit is contained in:
2012-10-30 06:43:30 +00:00
parent 3d7104c37a
commit b5e8e8da6f
3 changed files with 10 additions and 1 deletions

View File

@@ -542,7 +542,7 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
SimSel_FaceExt *f_ext = NULL;
int *indices = NULL;
float t_no[3]; /* temporary normal */
int type = BMO_slot_int_get(op, "type");
const int type = BMO_slot_int_get(op, "type");
const float thresh = BMO_slot_float_get(op, "thresh");
const float thresh_radians = thresh * (float)M_PI;
@@ -662,6 +662,13 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
}
break;
case SIMFACE_SIDES:
if (fm->len == fs->len) {
BMO_elem_flag_enable(bm, fm, FACE_MARK);
cont = FALSE;
}
break;
case SIMFACE_PERIMETER:
if (fabsf(f_ext[i].perim - f_ext[indices[idx]].perim) <= thresh) {
BMO_elem_flag_enable(bm, fm, FACE_MARK);