Blender V5.0
bmo_removedoubles.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_kdtree.h"
#include "BLI_listbase.h"
#include "BLI_map.hh"
#include "BLI_math_base.hh"
#include "BLI_math_vector.h"
#include "BLI_stack.h"
#include "BLI_stack.hh"
#include "BLI_utildefines_stack.h"
#include "BKE_customdata.hh"
#include "bmesh.hh"
#include "intern/bmesh_operators_private.hh"

Go to the source code of this file.

Macros

#define ELE_DEL   1
#define EDGE_COL   2
#define VERT_IN_FACE   4
#define LOOP_MAP_VERT_INIT(l_init, v_map, is_del)
#define VERT_KEEP   8
#define EDGE_MARK   1

Functions

static void remdoubles_splitface (BMFace *f, BMesh *bm, BMOperator *op, BMOpSlot *slot_targetmap)
static BMFaceremdoubles_createface (BMesh *bm, BMFace *f, BMOpSlot *slot_targetmap, bool *r_created)
void bmo_weld_verts_exec (BMesh *bm, BMOperator *op)
void bmo_pointmerge_facedata_exec (BMesh *bm, BMOperator *op)
void bmo_average_vert_facedata_exec (BMesh *bm, BMOperator *op)
void bmo_pointmerge_exec (BMesh *bm, BMOperator *op)
void bmo_collapse_exec (BMesh *bm, BMOperator *op)
static void bmo_collapsecon_do_layer (BMesh *bm, const int layer, const short oflag)
void bmo_collapse_uvs_exec (BMesh *bm, BMOperator *op)
static int * bmesh_find_doubles_by_distance_impl (BMesh *bm, BMVert *const *verts, const int verts_len, const float dist, const bool has_keep_vert)
static int * bmesh_find_doubles_by_distance_connected_impl (BMesh *bm, BMVert *const *verts, const int verts_len, const float dist, const bool has_keep_vert)
static void bmesh_find_doubles_common (BMesh *bm, BMOperator *op, BMOperator *optarget, BMOpSlot *optarget_slot)
void bmo_remove_doubles_exec (BMesh *bm, BMOperator *op)
void bmo_find_doubles_exec (BMesh *bm, BMOperator *op)

Detailed Description

Welding and merging functionality.

Definition in file bmo_removedoubles.cc.

Macro Definition Documentation

◆ EDGE_COL

#define EDGE_COL   2

Definition at line 61 of file bmo_removedoubles.cc.

Referenced by bmo_weld_verts_exec().

◆ EDGE_MARK

#define EDGE_MARK   1

Definition at line 364 of file bmo_removedoubles.cc.

◆ ELE_DEL

#define ELE_DEL   1

Definition at line 60 of file bmo_removedoubles.cc.

Referenced by bmo_weld_verts_exec().

◆ LOOP_MAP_VERT_INIT

#define LOOP_MAP_VERT_INIT ( l_init,
v_map,
is_del )
Value:
v_map = l_init->v; \
is_del = BMO_vert_flag_test_bool(bm, v_map, ELE_DEL); \
if (is_del) { \
v_map = static_cast<BMVert *>(BMO_slot_map_elem_get(slot_targetmap, v_map)); \
} \
((void)0)
BMesh * bm
#define BMO_vert_flag_test_bool(bm, e, oflag)
#define ELE_DEL

Referenced by remdoubles_createface().

◆ VERT_IN_FACE

#define VERT_IN_FACE   4

Definition at line 62 of file bmo_removedoubles.cc.

Referenced by remdoubles_createface().

◆ VERT_KEEP

Function Documentation

◆ bmesh_find_doubles_by_distance_connected_impl()

◆ bmesh_find_doubles_by_distance_impl()

int * bmesh_find_doubles_by_distance_impl ( BMesh * bm,
BMVert *const * verts,
const int verts_len,
const float dist,
const bool has_keep_vert )
static
Returns
a verts_len aligned array of indices. Index values:
  • -1: Not a duplicate, others may use as a target.
  • <itself>: Not a duplicate (marked to be kept), others may use as a target.
  • 0..verts_len: The target double.

Definition at line 672 of file bmo_removedoubles.cc.

References BLI_assert, bm, BMO_vert_flag_test, float, i, len_squared_v3v3(), MEM_freeN(), MEM_malloc_arrayN(), tree, VERT_KEEP, and verts.

Referenced by bmesh_find_doubles_common().

◆ bmesh_find_doubles_common()

◆ bmo_average_vert_facedata_exec()

◆ bmo_collapse_exec()

◆ bmo_collapse_uvs_exec()

◆ bmo_collapsecon_do_layer()

◆ bmo_find_doubles_exec()

void bmo_find_doubles_exec ( BMesh * bm,
BMOperator * op )

◆ bmo_pointmerge_exec()

◆ bmo_pointmerge_facedata_exec()

◆ bmo_remove_doubles_exec()

void bmo_remove_doubles_exec ( BMesh * bm,
BMOperator * op )

◆ bmo_weld_verts_exec()

◆ remdoubles_createface()

◆ remdoubles_splitface()

void remdoubles_splitface ( BMFace * f,
BMesh * bm,
BMOperator * op,
BMOpSlot * slot_targetmap )
static