31#ifdef USE_DEBUG_INDEX_MEMCHECK
32# define DEBUG_MEMCHECK_INDEX_INVALIDATE(ele) \
35 BM_elem_index_set(ele, undef_idx); \
57 const BMLoop *l_a_iter = l_a;
60 if (l_a_iter == l_a_end || l_b_iter == l_b_end) {
63 l_a_iter = l_a_iter->
next;
64 l_b_iter = l_b_iter->
next;
70 const BMLoop *l_a_iter = l_a;
74 if (l_b_iter->
v != l_a_iter->
v) {
77 if (l_a_iter == l_a_end) {
81 l_a_iter = l_a_iter->
next;
82 l_b_iter = l_b_iter->
next;
99 const BMLoop *l_a_iter = l_a;
102 if (l_a_iter == l_a_end || l_b_iter == l_b_end) {
105 l_a_iter = l_a_iter->
next;
106 l_b_iter = l_b_iter->
prev;
112 const BMLoop *l_a_iter = l_a;
115 if (l_b_iter->
v != l_a_iter->
v) {
118 if (l_a_iter == l_a_end) {
122 l_a_iter = l_a_iter->
next;
123 l_b_iter = l_b_iter->
prev;
143#ifdef USE_DEBUG_INDEX_MEMCHECK
144 DEBUG_MEMCHECK_INDEX_INVALIDATE(
v);
232#ifdef USE_DEBUG_INDEX_MEMCHECK
233 DEBUG_MEMCHECK_INDEX_INVALIDATE(
e);
311#ifdef USE_DEBUG_INDEX_MEMCHECK
312 DEBUG_MEMCHECK_INDEX_INVALIDATE(
l);
353#ifdef USE_BMESH_HOLES
360#ifdef USE_BMESH_HOLES
361 lst->first = lst->last =
l;
372 const bool copy_verts,
373 const bool copy_edges)
389 verts[i] = l_iter->
v;
392 }
while ((l_iter = l_iter->
next) != l_first);
400 if (l_iter->
e->
v1 == verts[i]) {
402 v2 = verts[(i + 1) % f->
len];
406 v1 = verts[(i + 1) % f->
len];
412 edges[i] = l_iter->
e;
415 }
while ((l_iter = l_iter->
next) != l_first);
426 const bool copy_verts,
427 const bool copy_edges)
439 l_copy = l_copy->
next;
440 }
while ((l_iter = l_iter->
next) != l_first);
456 l_copy = l_copy->
next;
457 }
while ((l_iter = l_iter->
next) != l_first);
475#ifdef USE_DEBUG_INDEX_MEMCHECK
476 DEBUG_MEMCHECK_INDEX_INVALIDATE(f);
491#ifdef USE_BMESH_HOLES
492 f->loops.clear_no_delete();
509#ifdef USE_BMESH_HOLES
547 for (i = 1; i <
len; i++) {
557 startl->
prev = lastl;
558 lastl->
next = startl;
590 const bool create_edges)
652 if (head->
htype != htype) {
666 if (
e->v1_disk_link.prev ==
nullptr ||
e->v2_disk_link.prev ==
nullptr ||
667 e->v1_disk_link.next ==
nullptr ||
e->v2_disk_link.next ==
nullptr)
678 if (
e->l && (
e->l->radial_next ==
nullptr ||
e->l->radial_prev ==
nullptr)) {
681 if (
e->l &&
e->l->f->len <= 0) {
702 "%s: fatal bmesh error (vert not in edge)! (bmesh internal error)\n",
710 if (
l->
f->
len <= 0) {
724 }
while ((l2 = l2->
next) !=
l);
726 if (i !=
l->
f->
len || l2 !=
l) {
742# ifdef USE_BMESH_HOLES
752 if (l_iter->
f != f) {
754 "%s: loop inside one face points to another! (bmesh internal error)\n",
765 if (l_iter->
e && l_iter->
v) {
800 }
while ((l_iter = l_iter->
next) != l_first);
812 }
while ((l_iter = l_iter->
next) != l_first);
930 edges[i++] = l_iter->
e;
931 }
while ((l_iter = l_iter->
next) != l_first);
948 verts[i++] = l_iter->
v;
949 }
while ((l_iter = l_iter->
next) != l_first);
959#ifdef USE_BMESH_HOLES
960 BMLoopList *ls, *ls_next;
970#ifdef USE_BMESH_HOLES
971 for (ls = f->loops.first; ls; ls = ls_next)
976 BMLoop *l_iter, *l_next, *l_first;
978#ifdef USE_BMESH_HOLES
980 l_iter = l_first = ls->first;
986 l_next = l_iter->
next;
991 }
while ((l_iter = l_next) != l_first);
993#ifdef USE_BMESH_HOLES
1003#ifdef USE_BMESH_HOLES
1004 BMLoopList *ls, *ls_next;
1009#ifdef USE_BMESH_HOLES
1010 for (ls = f->loops.first; ls; ls = ls_next)
1015 BMLoop *l_iter, *l_next, *l_first;
1017#ifdef USE_BMESH_HOLES
1019 l_iter = l_first = ls->first;
1021 l_iter = l_first = f->
l_first;
1026 l_next = l_iter->
next;
1032 if (
e->l ==
nullptr) {
1039 if (v1->
e ==
nullptr) {
1042 if (
v2->
e ==
nullptr) {
1046 }
while ((l_iter = l_next) != l_first);
1048#ifdef USE_BMESH_HOLES
1089 }
while ((
l =
l->
next) != l_first);
1096 const int cd_loop_mdisp_offset,
1097 const bool use_loop_mdisp_flip)
1105 bool is_prev_boundary = l_prev_radial_next == l_prev_radial_next->
radial_next;
1107 BMLoop *l_iter = l_first;
1112 bool is_iter_boundary = l_iter_radial_next == l_iter_radial_next->
radial_next;
1119 if (is_prev_boundary) {
1132 if (e_iter->
l == l_iter) {
1133 e_iter->
l = l_iter->
next;
1138 std::swap(l_iter->
next, l_iter->
prev);
1140 if (cd_loop_mdisp_offset != -1) {
1146 l_prev_radial_next = l_iter_radial_next;
1147 l_prev_radial_prev = l_iter_radial_prev;
1148 is_prev_boundary = is_iter_boundary;
1151 }
while ((l_iter = l_iter->
prev) != l_first);
1156 for (i = 0, l_iter = l_first; i < f->
len; i++, l_iter = l_iter->
next) {
1175 for (i = 0; i < tot; i++) {
1185 for (i = 0; i < tot; i++) {
1255#ifdef USE_BMESH_HOLES
1257 ListBaseT<BMLoopList> holes = {
nullptr,
nullptr};
1261 BMVert *v1 =
nullptr, *
v2 =
nullptr;
1265 const bool had_active_face = (
bm->
act_face !=
nullptr);
1269 *r_double =
nullptr;
1272 if (!totface) [[unlikely]] {
1287 for (i = 0; i < totface; i++) {
1307 else if (rlen == 2) {
1337 }
while ((l_iter = l_iter->
next) != l_first);
1339#ifdef USE_BMESH_HOLES
1340 for (lst = f->loops.first; lst; lst = lst->next) {
1341 if (lst == f->loops.first) {
1356 if (f_new ==
nullptr) [[unlikely]] {
1369 *r_double = f_existing;
1379 bool reusing_face = (f_existing && r_double ==
nullptr);
1383 if (reusing_face ==
false) [[likely]] {
1395 }
while (l2 != l_iter);
1399 if (l2->
v != l_iter->
v) {
1406 }
while ((l_iter = l_iter->
next) != l_first);
1408#ifdef USE_BMESH_HOLES
1413 for (lst = f_new->loops.first; lst; lst = lst->next) {
1414 l_iter = l_first = lst->first;
1417 }
while ((l_iter = l_iter->
next) != l_first);
1422 if (cd_loop_mdisp_offset != -1) {
1427 for (i = 0; i < totface; i++) {
1433 for (i = 0; i < totface; i++) {
1435 bm, l_iter, faces[i], f_center, faces_center[i], cd_loop_mdisp_offset);
1437 }
while ((l_iter = l_iter->
next) != l_first);
1447 for (
BMEdge *edge : deledges) {
1451 for (
BMVert *vert : delverts) {
1458 for (i = 0; i < totface; i++) {
1465 if (had_active_face &&
bm->
act_face ==
nullptr) {
1476#ifdef USE_BMESH_HOLES
1482#ifdef USE_BMESH_HOLES
1487#ifdef USE_BMESH_HOLES
1501#ifdef USE_BMESH_HOLES
1502 ListBaseT<BMLoopList> *holes,
1505 const bool no_double)
1507#ifdef USE_BMESH_HOLES
1508 BMLoopList *lst, *lst2;
1514 BMLoop *l_iter, *l_first;
1515 BMLoop *l_f1 =
nullptr, *l_f2 =
nullptr;
1539#ifdef USE_BMESH_HOLES
1540 lst = f->loops.first;
1541 lst2 = f2->loops.first;
1543 lst2->first = lst2->last = l_f2;
1544 lst->first = lst->last = l_f1;
1547 l_iter = l_first = l_f1;
1553 }
while ((l_iter = l_iter->
next) != l_first);
1555 if (first_loop_f1) {
1594 }
while ((l_iter = l_iter->
next) != l_first);
1606 }
while ((l_iter = l_iter->
next) != l_first);
1614#ifdef USE_BMESH_HOLES
1621 for (lst = f->loops.last; lst != f->loops.first; lst = lst2) {
1641 int valence1, valence2;
1689 bool is_first =
true;
1742 for (i = 0,
l =
e->l; i < radlen; i++, l = l->radial_next) {
1759 for (i = 0,
l = e_new->
l; i < radlen; i++, l = l->radial_next) {
1792 const bool check_edge_exists,
1793 const bool kill_degenerate_faces,
1794 const bool kill_duplicate_faces)
1797 BMVert *v_old, *v_target;
1812 int valence1, valence2;
1838 if (check_edge_exists) {
1857 if (l_kill->
next->
v == v_kill) {
1858 l_kill->
next->
v = v_target;
1869 if (kill_degenerate_faces && (l_kill->
f->
len < 3)) {
1875 if (kill_duplicate_faces) {
1883 }
while ((l_kill = l_kill_next) != e_kill->
l);
1899 v_kill->
e =
nullptr;
1910 for (i = 0,
l = e_old->
l; i < radlen; i++, l = l->radial_next) {
1923 if (check_edge_exists) {
1930 if (kill_degenerate_faces) {
1937 if (kill_duplicate_faces) {
1959 const bool check_edge_exists,
1960 const bool kill_degenerate_faces)
1968 BMLoop *l_kill, *l_first, *l_kill_next;
1969 l_kill = l_first = e_kill->
l;
1972 if (l_kill->
next->
v == v_kill) {
1973 l_kill->
next->
v = v_target;
1984 if (kill_degenerate_faces) {
1985 if (l_kill->
f->
len < 3) {
1993 }
while ((l_kill = l_kill_next) != l_first);
1995 e_kill->
l =
nullptr;
2002 if (v_target->
e && v_kill->
e) {
2005 while ((
e = v_kill->
e)) {
2008 if (check_edge_exists) {
2015 if (check_edge_exists) {
2023 if (kill_degenerate_faces) {
2040 BMLoop *l_iter, *l_f1 =
nullptr, *l_f2 =
nullptr;
2041 int newlen = 0, i, f1len = 0, f2len = 0;
2062 if (l_f1->
v == l_f2->v) {
2081 bool is_dupe =
false;
2088 for (i = 0, l_iter =
BM_FACE_FIRST_LOOP(f1); i < f1len; i++, l_iter = l_iter->next) {
2091 for (i = 0, l_iter =
BM_FACE_FIRST_LOOP(f2); i < f2len; i++, l_iter = l_iter->next) {
2092 if (l_iter != l_f2) {
2101 for (i = 0, l_iter =
BM_FACE_FIRST_LOOP(f1); i < f1len; i++, l_iter = l_iter->next) {
2122 f1->
len += (f2->
len - 2);
2163 bool is_double =
false;
2167 if (v_a->
e && v_b->
e) {
2170#define VERT_VISIT _FLAG_WALK
2173 e = e_first = v_a->
e;
2181 e = e_first = v_b->
e;
2191 e = e_first = v_a->
e;
2206 if (
ELEM(
nullptr, v_a->
e, v_b->
e)) {
2210 BMVert *v_pair[2] = {v_a, v_b};
2214 BMEdge *e_iter = v_pair[side]->
e;
2218 if (
l->
v == v_pair[side]) {
2224 if (loops_pair[side].is_empty()) {
2230 if (loops_pair[side].size() > 1) {
2231 std::ranges::sort(loops_pair[side],
2238 while (a_beg < loops_pair[0].size() && b_beg < loops_pair[1].size()) {
2239 const int a_len = loops_pair[0][a_beg]->f->len;
2240 const int b_len = loops_pair[1][b_beg]->f->len;
2242 if (a_len < b_len) {
2246 if (a_len > b_len) {
2252 const int f_len = a_len;
2253 int a_end = a_beg + 1;
2254 int b_end = b_beg + 1;
2255 while (a_end < loops_pair[0].size() && loops_pair[0][a_end]->f->len == f_len) {
2258 while (b_end < loops_pair[1].size() && loops_pair[1][b_end]->f->len == f_len) {
2263 for (
int a_index = a_beg; a_index < a_end; a_index++) {
2264 BMLoop *l_a = loops_pair[0][a_index];
2265 for (
int b_index = b_beg; b_index < b_end; b_index++) {
2295 BMLoop *l_collapse_a_first = v_collapse->
e->
l;
2296 if (l_collapse_a_first ==
nullptr) {
2301 BMEdge *e_b = (l_collapse_a_first->
v == v_collapse) ? l_collapse_a_first->
prev->
e :
2302 l_collapse_a_first->
next->
e;
2309 if (e_exists ==
nullptr || e_exists->
l ==
nullptr) {
2313 BMLoop *l_collapse_a_iter = l_collapse_a_first;
2315 if (l_collapse_a_iter->
f->
len <= 3) {
2318 BMLoop *l_collapse =
nullptr;
2319 if (l_collapse_a_iter->
v == v_collapse) {
2320 l_collapse = l_collapse_a_iter;
2322 else if (l_collapse_a_iter->
next->
v == v_collapse) {
2323 l_collapse = l_collapse_a_iter->
next;
2325 else if (l_collapse_a_iter->
prev->
v == v_collapse) {
2326 l_collapse = l_collapse_a_iter->
prev;
2328 BLI_assert(l_collapse && l_collapse->
v == v_collapse);
2332 BMLoop *l_exists_iter = e_exists->
l;
2334 if (l_collapse_a_iter->
f->
len - 1 != l_exists_iter->
f->
len) {
2341 const bool swap_winding = l_collapse_beg->
v == l_exists_iter->
v;
2345 l_exists_beg = l_exists_iter;
2346 l_exists_end = l_exists_iter->
next;
2349 l_exists_beg = l_exists_iter->
next;
2350 l_exists_end = l_exists_iter;
2360 l_collapse_end->
prev,
2362 l_exists_end->
next))
2371 l_collapse_end->
prev,
2373 l_exists_end->
prev))
2378 }
while ((l_exists_iter = l_exists_iter->
radial_next) != e_exists->
l);
2379 }
while ((l_collapse_a_iter = l_collapse_a_iter->
radial_next) != l_collapse_a_first);
2390 const int side_b_len = (l_a->
f->
len - f_len) + 2;
2401 if (v_src == v_dst) {
2408 while ((
e = v_src->
e)) {
2429 return (
e->l &&
e->l->radial_next !=
e->l);
2435 int v_edges_num = 0;
2452 int edges_found = 0;
2454#define EDGE_VISIT _FLAG_WALK
2458 BMEdge *e_first, *e_iter;
2459 e_iter = e_first =
v->
e;
2480 BMLoop *l_iter, *l_first;
2481 l_iter = l_first =
e->l;
2489 }
while ((l_iter = l_iter->
radial_next) != l_first);
2497 if (edges_found == v_edges_num) {
2526 if (r_vout_len !=
nullptr) {
2527 *r_vout_len = verts_num;
2530 if (r_vout !=
nullptr) {
2578 }
while ((n_step = n_step->
next));
2580 }
while ((n_orig = n_orig->
next) && n_orig->
next);
2581 }
while ((edges_separate = edges_separate->
next));
2588 const bool copy_select,
2592 LinkNode *edges_separate =
nullptr;
2595 for (i = 0; i < e_in_len; i++) {
2612 if (edges_separate) {
2620 const bool copy_select,
2624 LinkNode *edges_separate =
nullptr;
2625 BMEdge *e_iter, *e_first;
2627 e_iter = e_first =
v->
e;
2637 if (edges_separate ==
nullptr && edges_orig ==
nullptr) {
2651 if (edges_separate) {
2660 BMEdge *e_iter, *e_first;
2662 e_iter = e_first = v_src->
e;
2664 if (testfn(e_iter, arg)) {
2671 e_iter =
static_cast<BMEdge *
>(edges_hflag->
link);
2673 }
while ((edges_hflag = edges_hflag->
next));
2727 if (l_sep ==
e->l) {
2773 while (!
ELEM(e_iter, l_sep->
e, l_sep->
prev->
e)) {
2779 if (e_iter == v_sep->
e) {
2785 v_sep->
e = l_sep->
e;
2789 edges[0] = l_sep->
e;
2790 edges[1] = l_sep->
prev->
e;
2816 bool is_mixed_edge_any =
false;
2818 bool is_mixed_loop_any =
false;
2820#define LOOP_VISIT _FLAG_WALK
2821#define EDGE_VISIT _FLAG_WALK
2823 for (i = 0; i < larr_len; i++) {
2838 for (
int j = 0; j <
ARRAY_SIZE(loop_pair); j++) {
2854 BMEdge *e_first, *e_iter;
2855 e_iter = e_first = v_sep->
e;
2858 BMLoop *l_iter, *l_first;
2859 bool is_mixed_loop =
false;
2861 l_iter = l_first = e_iter->
l;
2864 is_mixed_loop =
true;
2867 }
while ((l_iter = l_iter->
radial_next) != l_first);
2869 if (is_mixed_loop) {
2874 is_mixed_loop_any =
true;
2881 is_mixed_edge_any =
true;
2888 if (is_mixed_loop_any ==
false && is_mixed_edge_any ==
false) {
2898 BMLoop *l_iter, *l_first, *l_next;
2909 if (
e->v1 == v_sep) {
2910 e_new_v_pair[0] = v_new;
2911 e_new_v_pair[1] =
e->v2;
2915 e_new_v_pair[0] =
e->v1;
2916 e_new_v_pair[1] = v_new;
2922 l_iter = l_first =
e->l;
2930 }
while ((l_iter = l_next) != l_first);
2941 for (i = 0; i < larr_len; i++) {
2965 BMLoop *l_iter, *l_first;
2970 l_iter = l_first =
e->l;
2972 if (l_iter->
v == v_src) {
2978 else if (l_iter->
next->
v == v_src) {
2979 l_iter->
next->
v = v_dst;
2987 }
while ((l_iter = l_iter->
radial_next) != l_first);
3001 BMLoop *l_iter, *l_first;
3008 }
while ((l_iter = l_iter->
next) != l_first);
3013 }
while ((l_iter = l_iter->
next) != l_first);
3015 std::swap((*f_a), (*f_b));
CustomData interface, see also DNA_customdata_types.h.
#define ENUM_OPERATORS(_enum_type)
#define BLI_linklist_prepend_alloca(listp, ptr)
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_SMALLSTACK_DECLARE(var, type)
#define BLI_SMALLSTACK_AS_TABLE(var, data)
#define BLI_SMALLSTACK_POP(var)
#define BLI_SMALLSTACK_PUSH(var, data)
#define STACK_PUSH(stack, val)
#define STACK_DECLARE(stack)
#define STACK_SIZE(stack)
#define STACK_INIT(stack, stack_num)
Read Blender memory allocation and freeing.
#define UNUSED_FUNCTION(x)
#define UNUSED_VARS_NDEBUG(...)
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_test(ele, hflag)
#define BM_select_history_remove(bm, ele)
#define BM_ELEM_API_FLAG_DISABLE(element, f)
#define BM_ELEM_API_FLAG_TEST(element, f)
#define BM_CHECK_ELEMENT(el)
#define BM_ELEM_API_FLAG_ENABLE(element, f)
#define BM_edge_face_count_is_over(e, n)
#define BM_vert_edge_count_is_equal(v, n)
constexpr IndexRange()=default
void append(const T &value)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
void bmesh_disk_edge_remove(BMEdge *e, BMVert *v)
@ IS_LOOP_WRONG_VERT_TYPE
@ IS_EDGE_ZERO_FACE_LENGTH
@ IS_FACE_LOOP_VERT_NOT_IN_EDGE
@ IS_LOOP_WRONG_RADIAL_LENGTH
@ IS_FACE_LOOP_WRONG_RADIAL_LENGTH
@ IS_FACE_WRONG_LOOP_FACE
@ IS_LOOP_NULL_CYCLE_LINK
@ IS_LOOP_WRONG_FACE_TYPE
@ IS_LOOP_WRONG_EDGE_TYPE
@ IS_LOOP_ZERO_FACE_LENGTH
@ IS_LOOP_WRONG_FACE_LENGTH
@ IS_VERT_WRONG_EDGE_TYPE
@ IS_EDGE_WRONG_FACE_TYPE
@ IS_LOOP_VERT_NOT_IN_EDGE
@ IS_EDGE_NULL_RADIAL_LINK
@ IS_EDGE_WRONG_LOOP_TYPE
@ IS_FACE_LOOP_WRONG_DISK_LENGTH
void BM_face_calc_center_median(const BMFace *f, float r_cent[3])
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
BMFace * BM_face_copy(BMesh *bm_dst, const BMCustomDataCopyMap &cd_face_map, const BMCustomDataCopyMap &cd_loop_map, BMFace *f, const bool copy_verts, const bool copy_edges)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void bmesh_radial_loop_append(BMEdge *e, BMLoop *l)
BMFace * BM_face_create_verts(BMesh *bm, BMVert **vert_arr, const int len, const BMFace *f_example, const eBMCreateFlag create_flag, const bool create_edges)
bool BM_face_pair_overlap_check_subset_same_winding(const BMLoop *l_a, const BMLoop *l_a_end, const BMLoop *l_b, const BMLoop *l_b_end)
bool bmesh_disk_validate(int len, BMEdge *e, BMVert *v)
static void bm_elements_systag_disable(void *veles, int tot, const char api_flag)
void * CustomData_bmesh_get(const CustomData *data, void *block, eCustomDataType type)
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
void bmesh_kernel_loop_reverse(BMesh *bm, BMFace *f, const int cd_loop_mdisp_offset, const bool use_loop_mdisp_flip)
Loop Reverse.
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
BMFace * bmesh_kernel_split_face_make_edge(BMesh *bm, BMFace *f, BMLoop *l_v1, BMLoop *l_v2, BMLoop **r_l, BMEdge *e_example, const bool no_double)
Split Face Make Edge (SFME).
static void bm_kill_only_edge(BMesh *bm, BMEdge *e)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
BMVert * bmesh_kernel_join_vert_kill_edge(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool check_edge_exists, const bool kill_degenerate_faces)
Join Vert Kill Edge (JVKE).
void BM_vert_separate_hflag(BMesh *bm, BMVert *v, const char hflag, const bool copy_select, BMVert ***r_vout, int *r_vout_len)
bool bmesh_radial_validate(int radlen, BMLoop *l)
void bmesh_edge_vert_swap(BMEdge *e, BMVert *v_dst, BMVert *v_src)
void BM_vert_kill(BMesh *bm, BMVert *v)
void BM_face_edges_kill(BMesh *bm, BMFace *f)
static BMFace * bm_face_create__sfme(BMesh *bm, BMFace *f_example)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
static void bmesh_kernel_vert_separate__cleanup(BMesh *bm, LinkNode *edges_separate)
void void void BLI_movelisttolist(ListBase *dst, ListBase *src) ATTR_NONNULL(1
BMVert * bmesh_kernel_unglue_region_make_vert_multi(BMesh *bm, BMLoop **larr, int larr_len)
static void bm_kill_only_loop(BMesh *bm, BMLoop *l)
bool bmesh_loop_validate(BMFace *f)
BMVert * bmesh_kernel_split_edge_make_vert(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e)
Split Edge Make Vert (SEMV).
BMVert * bmesh_kernel_unglue_region_make_vert_multi_isolated(BMesh *bm, BMLoop *l_sep)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void CustomData_bmesh_copy_block(CustomData &data, void *src_block, void **dst_block)
BMVert * BM_vert_create(BMesh *bm, const float co[3], const BMVert *v_example, const eBMCreateFlag create_flag)
Main function for creating a new vertex.
static void bm_elements_systag_enable(void *veles, int tot, const char api_flag)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BMFace * BM_face_create(BMesh *bm, BMVert *const *verts, BMEdge *const *edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
static int UNUSED_FUNCTION bm_loop_length(BMLoop *l)
BMEdge * bmesh_kernel_join_edge_kill_vert(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool check_edge_exists, const bool kill_degenerate_faces, const bool kill_duplicate_faces)
Join Edge Kill Vert (JEKV).
int bmesh_elem_check(void *element, const char htype)
void BM_vert_separate_tested_edges(BMesh *, BMVert *v_dst, BMVert *v_src, bool(*testfn)(BMEdge *, void *arg), void *arg)
void bmesh_kernel_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep, const bool copy_select)
Separate Edge.
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void bmesh_radial_loop_remove(BMEdge *e, BMLoop *l)
BMESH RADIAL REMOVE LOOP.
void BM_face_verts_kill(BMesh *bm, BMFace *f)
int BM_face_share_edge_count(BMFace *f_a, BMFace *f_b)
int bmesh_radial_length(const BMLoop *l)
void BLI_mempool_free(BLI_mempool *pool, void *addr) ATTR_NONNULL(1
BMFace * BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del, BMFace **r_double)
Join Connected Faces.
void BM_vert_separate(BMesh *bm, BMVert *v, BMEdge **e_in, int e_in_len, const bool copy_select, BMVert ***r_vout, int *r_vout_len)
void CustomData_bmesh_free_block(CustomData *data, void **block)
void CustomData_bmesh_set_default(CustomData *data, void **block)
int bmesh_disk_count_at_most(const BMVert *v, int count_max)
void bmesh_disk_vert_replace(BMEdge *e, BMVert *v_dst, BMVert *v_src)
static void bm_kill_only_vert(BMesh *bm, BMVert *v)
ATTR_WARN_UNUSED_RESULT const BMFlagLayer * oflags
static void bm_kill_only_face(BMesh *bm, BMFace *f)
bool BM_edge_splice(BMesh *bm, BMEdge *e_dst, BMEdge *e_src)
Splice Edge.
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BM_edge_kill(BMesh *bm, BMEdge *e)
BMFace * bmesh_kernel_join_face_kill_edge(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e)
Join Face Kill Edge (JFKE).
bool BM_edges_from_verts(BMEdge **edge_arr, BMVert **vert_arr, const int len)
void BM_elem_select_copy(BMesh *bm_dst, void *ele_dst_v, const void *ele_src_v)
void bmesh_kernel_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len, const bool copy_select)
Separate Vert.
bool BM_face_split_check_double_face(BMLoop *l_a, BMLoop *l_b, const int f_len)
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
int bmesh_disk_count(const BMVert *v)
static BMFace * bm_face_copy_impl(BMesh *bm_dst, BMFace *f, const bool copy_verts, const bool copy_edges)
bool BM_vert_pair_share_face_check(BMVert *v_a, BMVert *v_b)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
BMVert * bmesh_kernel_unglue_region_make_vert(BMesh *bm, BMLoop *l_sep)
Un-glue Region Make Vert (URMV).
void BM_face_kill_loose(BMesh *bm, BMFace *f)
bool BM_vert_splice(BMesh *bm, BMVert *v_dst, BMVert *v_src)
Splice Vert.
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void bmesh_disk_edge_append(BMEdge *e, BMVert *v)
BLI_INLINE bool BM_verts_in_edge(const BMVert *v1, const BMVert *v2, const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BKE_mesh_mdisp_flip(MDisps *md, bool use_loop_mdisp_flip)
MINLINE void zero_v3(float r[3])
static BMLoop * bm_face_boundary_add(BMesh *bm, BMFace *f, BMVert *startv, BMEdge *starte, const eBMCreateFlag create_flag)
bool BM_vert_splice_check_double_edge(BMVert *v_a, BMVert *v_b)
static int UNUSED_FUNCTION bm_vert_systag_count_disk(BMVert *v, const char api_flag)
BMFace * BM_face_exists(BMVert *const *varr, int len)
void BM_edges_from_verts_ensure(BMesh *bm, BMEdge **edge_arr, BMVert **vert_arr, const int len)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void BM_face_kill(BMesh *bm, BMFace *f)
BMFace * BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
Make NGon.
void * BLI_mempool_calloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
BMFace * BM_face_exists_subset_from_face(BMLoop *l_a, BMLoop *l_b, const int f_len)
static BMLoop * bm_loop_create(BMesh *bm, BMVert *v, BMEdge *e, BMFace *f, const BMLoop *l_example, const eBMCreateFlag create_flag)
bool BM_vert_is_edge_pair(const BMVert *v)
static void bmesh_edge_vert_swap__recursive(BMEdge *e, BMVert *v_dst, BMVert *v_src)
BLI_INLINE BMEdge * bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BMFace * BM_face_find_double(BMFace *f)
void * BLI_mempool_alloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
bool BM_vert_splice_check_double_face(BMVert *v_a, BMVert *v_b)
bool BM_vert_collapse_check_double_face(BMVert *v_collapse)
void BM_loop_interp_multires_ex(BMesh *, BMLoop *l_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset)
void BM_elem_attrs_copy(BMesh *bm, const BMCustomDataCopyMap &map, const BMVert *src, BMVert *dst)
ATTR_WARN_UNUSED_RESULT const void * element
void bmesh_radial_loop_unlink(BMLoop *l)
BMEdge * BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag)
Main function for creating a new edge.
BLI_INLINE BMFace * bm_face_create__internal(BMesh *bm)
static bool bm_vert_is_manifold_flagged(BMVert *v, const char api_flag)
void bmesh_face_swap_data(BMFace *f_a, BMFace *f_b)
BLI_INLINE bool bm_edge_supports_separate(const BMEdge *e)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
bool BM_face_pair_overlap_check_subset_swap_winding(const BMLoop *l_a, const BMLoop *l_a_end, const BMLoop *l_b, const BMLoop *l_b_end)
static int bm_loop_systag_count_radial(BMLoop *l, const char api_flag)
struct BMLoop * radial_prev
struct BMLoop * radial_next
struct BMLoop * radial_next
struct BMLoop * radial_prev
BLI_mempool * vtoolflagpool
BLI_mempool * ftoolflagpool
BLI_mempool * etoolflagpool