Blender V5.3
mesh_merge_verts.cc File Reference
#include "BKE_attribute_math.hh"
#include "BLI_array.hh"
#include "BLI_array_utils.hh"
#include "BLI_index_mask.hh"
#include "BLI_kdtree_new.hh"
#include "BLI_listbase.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_offset_indices.hh"
#include "BLI_ordered_edge.hh"
#include "BLI_task.hh"
#include "BLI_vector.hh"
#include "BKE_attribute.hh"
#include "BKE_attribute_filters.hh"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_mesh.hh"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "GEO_mesh_merge_verts.hh"
#include "GEO_randomize.hh"

Go to the source code of this file.

Classes

struct  blender::geometry::WeldFace
struct  blender::geometry::RemovedFacesAndCorners
struct  blender::geometry::WeldMesh
struct  blender::geometry::MergePropagationMap
struct  blender::geometry::WeldVertexCluster

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::geometry

Macros

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

Functions

template<typename Fn>
static void blender::geometry::foreach_weld_face_corner (const WeldFace &weld_face, const Span< int > corner_next, const Fn &fn)
std::optional< Mesh * > blender::geometry::mesh_merge_verts (const Mesh &mesh, const IndexMask &selection, Span< int > merge_ids, const bke::AttributeFilter &attribute_filter)
Vert API
static Array< bool > blender::geometry::find_affected_verts (const Span< int > vert_src_to_target)
Edge API
static IndexMask blender::geometry::find_collapsed_and_weld_edges (const Span< int2 > edges, const Span< int > vert_src_to_target, const Span< bool > vert_affected, IndexMaskMemory &memory, MutableSpan< int > r_edge_src_to_target, int *r_collapsed_edges_num)
static int blender::geometry::find_duplicate_edges (const Span< int2 > edges, const Span< int > vert_src_to_target, const IndexMask &weld_edges, const int verts_num, MutableSpan< int > r_edge_src_to_target)
Poly and Loop API
static void blender::geometry::weld_face_corner_ctx_alloc (const OffsetIndices< int > faces, const Span< int > corner_verts, WeldMesh *r_weld_mesh)
static void blender::geometry::weld_face_split_recursive (int face_size, const Span< int > corner_verts, WeldFace *r_wp, WeldMesh *r_weld_mesh, RemovedFacesAndCorners &r_removed)
static int blender::geometry::collapse_weld_face (const Span< int > corner_edges, const Span< int > edge_src_to_target, WeldFace &weld_face, MutableSpan< int > corner_next, RemovedFacesAndCorners &r_removed)
static void blender::geometry::weld_face_corner_ctx_setup_collapsed_and_split (const Span< int > corner_verts, const Span< int > corner_edges, const int remaining_edge_ctx_num, WeldMesh *r_weld_mesh)
static void blender::geometry::weld_face_find_doubles (const Span< int > corner_verts, WeldMesh *r_weld_mesh)
Mesh API
static void blender::geometry::weld_mesh_context_create (const Mesh &mesh, const Span< int > vert_src_to_target, const Span< bool > vert_affected, const int removed_verts_num, WeldMesh *r_weld_mesh)
Merging
static IndexMask blender::geometry::merge_survivors (const Span< int > src_to_target, IndexMaskMemory &memory)
static MergePropagationMap blender::geometry::merge_propagation_map (const Span< int > src_to_target, const IndexMask &survivors, const Span< int > src_to_dst, const bool do_mix_data, IndexMaskMemory &memory)
static Array< int > blender::geometry::merge_src_to_dst_map (const Span< int > src_to_target, const IndexMask &survivors)
Mesh Vertex Merging
static void blender::geometry::copy_and_mix_attributes (const bke::AttributeAccessor src_attributes, const bke::AttrDomain domain, const bke::AttributeFilter &attribute_filter, const MergePropagationMap &map, bke::MutableAttributeAccessor dst_attributes)
static void blender::geometry::mix_vertex_groups (const Mesh &mesh_src, const MergePropagationMap &map, Mesh &mesh_dst)
static Set< StringRef > blender::geometry::get_vertex_group_names (const Mesh &mesh)
static Mesh * blender::geometry::create_merged_mesh (const Mesh &mesh, const Span< int > vert_src_to_target, const int removed_vertex_count, const bool do_mix_data, const bke::AttributeFilter &attribute_filter)
Merge Map Creation
std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_all (const Mesh &mesh, const IndexMask &selection, float merge_distance, const bke::AttributeFilter &attribute_filter=bke::AttributeFilter::default_filter())
std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_connected (const Mesh &mesh, Span< bool > selection, float merge_distance, bool only_loose_edges, const bke::AttributeFilter &attribute_filter=bke::AttributeFilter::default_filter())
Mesh * blender::geometry::mesh_merge_verts (const Mesh &mesh, Span< int > vert_src_to_target, int removed_verts_num, bool do_mix_data)

Macro Definition Documentation

◆ ELEM_COLLAPSED

◆ ELEM_DUPLICATE

#define ELEM_DUPLICATE   int(-3)

Definition at line 52 of file mesh_merge_verts.cc.

Referenced by blender::geometry::weld_face_find_doubles().

◆ ELEM_MERGED

#define ELEM_MERGED   int(-2)

Definition at line 50 of file mesh_merge_verts.cc.

◆ OUT_OF_CONTEXT