diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-13 11:50:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-13 11:56:26 +0400 |
commit | dd8a9eee3b403e91543e358b2ecffd40d3adaa6b (patch) | |
tree | 8830034c7f5634e69f528baa4e0cf92ea68e00a7 /source/blender/bmesh/intern/bmesh_polygon.c | |
parent | 46bd759964cad419a65c38de69770d7a3cb7a836 (diff) |
Fix T40162: Vert connect creates extra face cutting across concave NGon.
We need to support cutting degenerate ngons, see: T39418
This commit disallows cuts across faces where the same vertices can create better cuts on different faces.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_polygon.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_polygon.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 32b9d81a223..ed12c641014 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -1104,6 +1104,21 @@ void BM_face_splits_check_legal(BMFace *f, BMLoop *(*loops)[2], int len) } } +/** + * This simply checks that the verts don't connect faces which would have more optimal splits. + * but _not_ check for correctness. + */ +void BM_face_splits_check_optimal(BMFace *f, BMLoop *(*loops)[2], int len) +{ + int i; + + for (i = 0; i < len; i++) { + BMLoop *l_a_dummy, *l_b_dummy; + if (f != BM_vert_pair_share_face_by_angle(loops[i][0]->v, loops[i][1]->v, &l_a_dummy, &l_b_dummy, false)) { + loops[i][0] = NULL; + } + } +} /** * Small utility functions for fast access |