Blender V4.3
bmesh_polygon_edgenet.hh File Reference
#include "BLI_vector.hh"

Go to the source code of this file.

Functions

bool BM_face_split_edgenet (BMesh *bm, BMFace *f, BMEdge **edge_net, int edge_net_len, blender::Vector< BMFace * > *r_face_arr)
 
bool BM_face_split_edgenet_connect_islands (BMesh *bm, BMFace *f, BMEdge **edge_net_init, uint edge_net_init_len, bool use_partial_connect, struct MemArena *mem_arena, BMEdge ***r_edge_net_new, uint *r_edge_net_new_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
 

Function Documentation

◆ BM_face_split_edgenet()

bool BM_face_split_edgenet ( BMesh * bm,
BMFace * f,
BMEdge ** edge_net,
int edge_net_len,
blender::Vector< BMFace * > * r_face_arr )

Splits a face into many smaller faces defined by an edge-net. handle customdata and degenerate cases.

  • Isolated holes or unsupported face configurations, will be ignored.
  • Customdata calculations aren't efficient (need to calculate weights for each vert).

Definition at line 445 of file bmesh_polygon_edgenet.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_CREATE_NOP, BM_edge_in_face(), BM_ELEM_API_FLAG_DISABLE, BM_ELEM_API_FLAG_ENABLE, BM_ELEM_API_FLAG_TEST, BM_ELEM_SELECT, BM_face_create_verts(), BM_FACE_FIRST_LOOP, BM_face_kill(), bm_face_split_edgenet_find_loop(), bm_face_split_edgenet_find_loop_pair_exists(), BM_ITER_ELEM, BM_LOOPS_OF_VERT, BM_VERTS_OF_EDGE, bmesh_face_swap_data(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), BMVert::co, copy_v3_v3(), CustomData_bmesh_copy_block(), CustomData_bmesh_interp(), CustomData_has_math(), BMHeader::data, BMLoop::e, EDGE_NET, BMLoop::f, FACE_NET, float, BMFace::head, BMLoop::head, BMHeader::hflag, interp_weights_poly_v2(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), BMesh::ldata, BMFace::len, MEM_freeN(), MEM_mallocN, mul_v2_m3v3(), BMLoop::next, BMFace::no, STACK_DECLARE, STACK_INIT, STACK_POP, STACK_PUSH, BMesh::totfacesel, BMLoop::v, v, v2, VERT_IN_QUEUE, VERT_VISIT, and w().

Referenced by bm_face_split_by_edges(), bm_face_split_by_edges_island_connect(), BM_mesh_intersect_edges(), bpy_bm_utils_face_split_edgenet(), face_edges_split(), and knife_make_face_cuts().

◆ BM_face_split_edgenet_connect_islands()

bool BM_face_split_edgenet_connect_islands ( BMesh * bm,
BMFace * f,
BMEdge ** edge_net_init,
uint edge_net_init_len,
bool use_partial_connect,
struct MemArena * mem_arena,
BMEdge *** r_edge_net_new,
uint * r_edge_net_new_len )

For when the edge-net has holes in it-this connects them.

Parameters
use_partial_connectSupport for handling islands connected by only a single edge,
Note
that this is quite slow so avoid using where possible.
Parameters
mem_arenaAvoids many small allocations & should be cleared after each use. take care since edge_net_new is stored in r_edge_net_new.