2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Contributor(s): Joseph Eagar.
20
* ***** END GPL LICENSE BLOCK *****
23
#ifndef __BMESH_MODS_H__
24
#define __BMESH_MODS_H__
26
/** \file blender/bmesh/intern/bmesh_mods.h
32
int BM_vert_dissolve(BMesh *bm, BMVert *v);
34
int BM_disk_dissolve(BMesh *bm, BMVert *v);
36
BMFace *BM_faces_join_pair(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e, const short do_del);
38
BMEdge *BM_verts_connect(BMesh *bm, BMVert *v1, BMVert *v2, BMFace **r_f);
40
BMFace *BM_face_split(BMesh *bm, BMFace *f,
41
BMVert *v1, BMVert *v2,
43
BMEdge *example, const short nodouble);
45
BMFace *BM_face_split_n(BMesh *bm, BMFace *f,
46
BMVert *v1, BMVert *v2,
47
float cos[][3], int n,
48
BMLoop **r_l, BMEdge *example);
50
BMEdge* BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac,
51
const short join_faces, const short kill_degenerate_faces);
52
BMEdge* BM_vert_collapse_edge(BMesh *bm, BMEdge *ke, BMVert *kv,
53
const short kill_degenerate_faces);
56
BMVert *BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float percent);
58
BMVert *BM_edge_split_n(BMesh *bm, BMEdge *e, int numcuts);
60
int BM_face_validate(BMFace *face, FILE *err);
62
void BM_edge_calc_rotate(BMEdge *e, int ccw,
63
BMLoop **r_l1, BMLoop **r_l2);
64
int BM_edge_rotate_check(BMEdge *e);
65
int BM_edge_rotate_check_degenerate(BMEdge *e,
66
BMLoop *l1, BMLoop *l2);
67
int BM_edge_rotate_check_beauty(BMEdge *e,
68
BMLoop *l1, BMLoop *l2);
69
BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const short ccw, const short check_flag);
71
/* flags for BM_edge_rotate */
73
BM_EDGEROT_CHECK_EXISTS = (1 << 0), /* disallow to rotate when the new edge matches an existing one */
74
BM_EDGEROT_CHECK_SPLICE = (1 << 1), /* overrides existing check, if the edge already, rotate and merge them */
75
BM_EDGEROT_CHECK_DEGENERATE = (1 << 2), /* disallow creating bow-tie, concave or zero area faces */
76
BM_EDGEROT_CHECK_BEAUTY = (1 << 3) /* disallow to rotate into ugly topology */
80
BMVert *BM_face_vert_separate(BMesh *bm, BMFace *sf, BMVert *sv);
81
BMVert *BM_face_loop_separate(BMesh *bm, BMLoop *sl);
83
#endif /* __BMESH_MODS_H__ */