fix [#30352] Dissolving a vert in an edgeloop (no faces) just deletes the verts killing connections

collapse the vertex into an edge when it has 2 edges connected to it.
This commit is contained in:
Campbell Barton
2012-02-25 23:29:12 +00:00
parent c65b3b73fd
commit e20d09f079

View File

@@ -82,8 +82,15 @@ int BM_vert_dissolve(BMesh *bm, BMVert *v)
if (!BM_vert_is_manifold(bm, v)) {
if (!v->e) BM_vert_kill(bm, v);
else if (!v->e->l) {
BM_edge_kill(bm, v->e);
BM_vert_kill(bm, v);
if (len == 2) {
BM_vert_collapse_edge(bm, v->e, v);
}
else {
/* this may be too harsh, we could do nothing here instead.
* To test, connect 3 edges to a vert and dissolve the vert. It will be removed */
BM_edge_kill(bm, v->e);
BM_vert_kill(bm, v);
}
}
else {
return FALSE;