BMesh: replace radial count with simple checks
authorCampbell Barton <ideasman42@gmail.com>
Sat, 2 May 2015 07:12:32 +0000 (17:12 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 2 May 2015 18:41:39 +0000 (04:41 +1000)
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_queries.c

index 7083642f225bd1c5c830592663151d4c7ed7d19a..06bd62291195266ee68e429312868cae1b977baf 100644 (file)
@@ -1053,8 +1053,9 @@ static bool disk_is_flagged(BMVert *v, const char api_flag)
                        return false;
                }
                
-               if (bmesh_radial_length(l) == 1)
+               if (BM_edge_is_boundary(l->e)) {
                        return false;
+               }
                
                do {
                        if (!BM_ELEM_API_FLAG_TEST(l->f, api_flag))
index 61328a525f1e7c1698f6b8c886ab5e228f9e5560..296bde9eb33dd634446b40284fa2a217cb1199a6 100644 (file)
@@ -877,7 +877,7 @@ bool BM_vert_is_manifold(const BMVert *v)
                /* loose edge or edge shared by more than two faces,
                 * edges with 1 face user are OK, otherwise we could
                 * use BM_edge_is_manifold() here */
-               if (e->l == NULL || bmesh_radial_length(e->l) > 2) {
+               if (e->l == NULL || (e->l != e->l->radial_next->radial_next)) {
                        return false;
                }
                len++;