Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2012-03-07 18:44:43 +0400
committerHoward Trickey <howard.trickey@gmail.com>2012-03-07 18:44:43 +0400
commit9f742303a7880a4fb4656008b77adf2c798bc01f (patch)
tree4fc5867fdb4962fa3583ec376e885d13a051d8fc /source/blender/bmesh
parent41bdcc7e4e3409efefd9b591b86605d4f7fdff5d (diff)
Knifetool uses direct cutting instead of scanfill: fixes bugs 29908, 28963, 30333.
Knifetool accumulates a bunch of proposed cuts and when the user confirms, it makes them all. The old code did this by using scanfill to triangulate the cutting edges in their faces, and then merging triangles where possible. This sometimes ended up with strange lost faces, and also made it so that when holes were cut, the surrounding face ended up totally triangulated. But 29908 was an example of a lost face. This new code directly finds chains of cutting edges that go from one side of a face to the other and using BM_edge_split_n to make the cuts. Holes are handled by finding two good places where the hole can be connected to the containing face (using two because I think some other code in bmesh assumes that there are no edges that appear twice in a face). The old code is still there with #if SCANFILL_CUTS, so can easily revert if this proves to be a bad idea. Also, a small fix to previously added BM_split_n (forgot to copy face attributes to new face).
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index f00f6fa07b7..f47d9c0bc36 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -417,6 +417,9 @@ BMFace *BM_face_split_n(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, float cos[
* The radial_next is for f and goes from v2 to v1 */
if (nf) {
+ BM_elem_attrs_copy(bm, bm, f, nf);
+ copy_v3_v3(nf->no, f->no);
+
e = (*r_l)->e;
for (i = 0; i < n; i++) {
newv = bmesh_semv(bm, v2, e, &newe);