diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 14:14:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-04 14:14:31 +0400 |
commit | 452840559714feb293fdb2c3849a82ce265759cd (patch) | |
tree | 60d1228477442f098c9c035b0c12f5135862c220 /source/blender/bmesh/intern/bmesh_queries.c | |
parent | 0515f933d93903446c3d0ee8903e48e53c081217 (diff) |
add BM_edge_is_contiguous(), check for python api.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_queries.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index 60ebb99ce05..2284e183d97 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -763,6 +763,19 @@ int BM_edge_is_manifold(BMEdge *e) #endif /** + * Tests that the edge is manifold and + * that both its faces point the same way. + */ +bool BM_edge_is_contiguous(BMEdge *e) +{ + const BMLoop *l = e->l; + const BMLoop *l_other = l->radial_next; + return (l && (l_other != l) && /* not 0 or 1 face users */ + (l_other->radial_next == l) && /* 2 face users */ + (l_other->v != l->v)); +} + +/** * Tests whether or not an edge is on the boundary * of a shell (has one face associated with it) */ |