code cleanup: replace use of BM_edge_face_count with BM_edge_is_manifold and BM_edge_is_boundary

This commit is contained in:
Campbell Barton 2012-04-18 06:44:48 +00:00
parent 27696ddae1
commit f1ececaabb
3 changed files with 5 additions and 5 deletions

View File

@ -802,7 +802,7 @@ void BM_loop_face_tangent(BMLoop *l, float r_tangent[3])
*/
float BM_edge_face_angle(BMEdge *e)
{
if (BM_edge_face_count(e) == 2) {
if (BM_edge_is_manifold(e)) {
BMLoop *l1 = e->l;
BMLoop *l2 = e->l->radial_next;
return angle_normalized_v3v3(l1->f->no, l2->f->no);

View File

@ -308,7 +308,7 @@ static int test_extra_verts(BMesh *bm, BMVert *v)
found = FALSE;
e = BM_iter_new(&iter2, bm, BM_EDGES_OF_VERT, l->v);
for ( ; e; e = BM_iter_step(&iter2)) {
if (BM_edge_face_count(e) == 1) {
if (BM_edge_is_boundary(e)) {
found = TRUE;
}
f2 = BM_iter_new(&iter3, bm, BM_FACES_OF_EDGE, e);

View File

@ -413,7 +413,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
* otherwise we can't a face away from a wire edge */
totboundary_edge += (is_boundary != 0 || BM_edge_is_wire(e));
if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
if (is_boundary == FALSE && BM_edge_face_count(e) == 2) {
if (is_boundary == FALSE && BM_edge_is_manifold(e)) {
d = edbm_rip_rip_edgedist(ar, projectMat, e->v1->co, e->v2->co, fmval);
if (d < dist) {
dist = d;
@ -511,7 +511,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
/* rip two adjacent edges */
if (BM_edge_face_count(e2) == 1 || BM_vert_face_count(v) == 2) {
if (BM_edge_is_boundary(e2) || BM_vert_face_count(v) == 2) {
l = e2->l;
ripvert = BM_face_vert_separate(bm, l->f, v);
@ -520,7 +520,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
}
else if (BM_edge_face_count(e2) == 2) {
else if (BM_edge_is_manifold(e2)) {
l = e2->l;
e = BM_face_other_edge_loop(l->f, e2, v)->e;
BM_elem_flag_enable(e, BM_ELEM_TAG);