38 # define ERRMSG(format, args...) \
40 fprintf(stderr, "%s: " format ", " AT "\n", __func__, ##args); \
45 # define ERRMSG(format, ...) \
47 fprintf(stderr, "%s: " format ", " AT "\n", __func__, __VA_ARGS__); \
72 fprintf(stderr,
"\n");
73 ERRMSG(
"This is a debugging function and not intended for general use, running slow test!");
82 ERRMSG(
"vert %d: is hidden and selected", i);
115 ERRMSG(
"edge %d: is hidden and selected", i);
124 l_iter = l_first =
e->l;
127 if (l_iter->
e !=
e) {
128 ERRMSG(
"edge %d: has invalid loop, loop is of face %d", i,
BM_elem_index_get(l_iter->
f));
131 ERRMSG(
"edge %d: has invalid loop with vert not in edge, loop is of face %d",
136 ERRMSG(
"edge %d: has invalid loop with next vert not in edge, loop is of face %d",
140 }
while ((l_iter = l_iter->
radial_next) != l_first);
151 ERRMSG(
"face %d: is hidden and selected", i);
160 }
while ((l_iter = l_iter->
next) != l_first);
167 ERRMSG(
"face %d: has duplicate loop at corner: %d", i, j);
171 "face %d: has duplicate vert: %d, at corner: %d", i,
BM_elem_index_get(l_iter->
v), j);
175 "face %d: has duplicate edge: %d, at corner: %d", i,
BM_elem_index_get(l_iter->
e), j);
179 if (l_iter->
f != f) {
180 ERRMSG(
"face %d: has loop that points to face: %d at corner: %d",
186 ERRMSG(
"face %d: has invalid 'prev/next' at corner: %d", i, j);
189 ERRMSG(
"face %d: has invalid 'next/prev' at corner: %d", i, j);
192 ERRMSG(
"face %d: has invalid 'radial_prev/radial_next' at corner: %d", i, j);
195 ERRMSG(
"face %d: has invalid 'radial_next/radial_prev' at corner: %d", i, j);
202 }
while ((l_iter = l_iter->
next) != l_first);
205 ERRMSG(
"face %d: has length of %d but should be %d", i, f->
len, j);
213 }
while ((l_iter = l_iter->
next) != l_first);
218 const bool is_valid = (errtot == 0);
219 ERRMSG(
"Finished - errors %d", errtot);
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP free_value)
EdgeHash * BLI_edgehash_new_ex(const char *info, const unsigned int nentries_reserve)
bool BLI_edgehash_ensure_p(EdgeHash *eh, unsigned int v0, unsigned int v1, void ***r_val) ATTR_WARN_UNUSED_RESULT
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
bool BM_mesh_validate(BMesh *bm)
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
struct BMLoop * radial_prev
struct BMLoop * radial_next