Blender V4.3
mesh_merge_by_distance.cc File Reference
#include "BLI_array.hh"
#include "BLI_bit_vector.hh"
#include "BLI_index_mask.hh"
#include "BLI_kdtree.h"
#include "BLI_math_vector.h"
#include "BLI_offset_indices.hh"
#include "BLI_vector.hh"
#include "BKE_customdata.hh"
#include "BKE_mesh.hh"
#include "DNA_meshdata_types.h"
#include "GEO_mesh_merge_by_distance.hh"
#include "GEO_randomize.hh"

Go to the source code of this file.

Classes

struct  blender::geometry::WeldEdge
 
struct  blender::geometry::WeldLoop
 
struct  blender::geometry::WeldPoly
 
struct  blender::geometry::WeldMesh
 
struct  blender::geometry::WeldLoopOfPolyIter
 
struct  blender::geometry::WeldVertexCluster
 

Namespaces

namespace  blender
 
namespace  blender::geometry
 

Macros

#define OUT_OF_CONTEXT   int(-1)
 
#define ELEM_COLLAPSED   int(-2)
 
#define ELEM_MERGED   int(-2)
 

Functions

Vert API
static Vector< intblender::geometry::weld_vert_ctx_alloc_and_setup (MutableSpan< int > vert_dest_map, const int vert_kill_len)
 
Edge API
static Vector< WeldEdgeblender::geometry::weld_edge_ctx_alloc_and_find_collapsed (Span< int2 > edges, Span< int > vert_dest_map, MutableSpan< int > r_edge_dest_map, int *r_edge_collapsed_len)
 
static void blender::geometry::weld_edge_find_doubles (Span< WeldEdge > weld_edges, int mvert_num, MutableSpan< int > r_edge_dest_map, int *r_edge_double_kill_len)
 
Poly and Loop API
static bool blender::geometry::weld_iter_loop_of_poly_next (WeldLoopOfPolyIter &iter)
 
static bool blender::geometry::weld_iter_loop_of_poly_begin (WeldLoopOfPolyIter &iter, const WeldPoly &wp, Span< WeldLoop > wloop, const Span< int > corner_verts, const Span< int > corner_edges, Span< int > loop_map, int *group_buffer)
 
static void blender::geometry::weld_poly_loop_ctx_alloc (const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< int > corner_edges, WeldMesh *r_weld_mesh)
 
static void blender::geometry::weld_poly_split_recursive (int poly_loop_len, Span< int > vert_dest_map, WeldPoly *r_wp, WeldMesh *r_weld_mesh, int *r_poly_kill, int *r_loop_kill)
 
static void blender::geometry::weld_poly_loop_ctx_setup_collapsed_and_split (const int remain_edge_ctx_len, WeldMesh *r_weld_mesh)
 
static int blender::geometry::poly_find_doubles (const OffsetIndices< int > poly_corners_offsets, const int poly_num, const Span< int > corners, const int corner_index_max, Vector< int > &r_doubles_offsets, Array< int > &r_doubles_buffer)
 
static void blender::geometry::weld_poly_find_doubles (const Span< int > corner_verts, const Span< int > corner_edges, const int medge_len, WeldMesh *r_weld_mesh)
 
Mesh API
static void blender::geometry::weld_mesh_context_create (const Mesh &mesh, MutableSpan< int > vert_dest_map, const int vert_kill_len, const bool get_doubles, WeldMesh *r_weld_mesh)
 
CustomData
static void blender::geometry::merge_groups_create (Span< int > dest_map, Span< int > double_elems, MutableSpan< int > r_groups_offsets, Array< int > &r_groups_buffer)
 Create groups to merge.
 
static void blender::geometry::customdata_weld (const CustomData *source, CustomData *dest, const int *src_indices, int count, int dest_index)
 
static void blender::geometry::merge_customdata_all (const CustomData *source, CustomData *dest, Span< int > dest_map, Span< int > double_elems, const int dest_size, const bool do_mix_data, Array< int > &r_final_map)
 Applies to CustomData *dest the values in CustomData *source.
 
Mesh Vertex Merging
static Meshblender::geometry::create_merged_mesh (const Mesh &mesh, MutableSpan< int > vert_dest_map, const int removed_vertex_count, const bool do_mix_data)
 
Merge Map Creation
std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_all (const Mesh &mesh, const IndexMask &selection, float merge_distance)
 
std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_connected (const Mesh &mesh, Span< bool > selection, float merge_distance, bool only_loose_edges)
 
Meshblender::geometry::mesh_merge_verts (const Mesh &mesh, MutableSpan< int > vert_dest_map, int vert_dest_map_len, const bool do_mix_data)
 

Macro Definition Documentation

◆ ELEM_COLLAPSED

◆ ELEM_MERGED

#define ELEM_MERGED   int(-2)

Definition at line 38 of file mesh_merge_by_distance.cc.

◆ OUT_OF_CONTEXT