|
Blender V5.0
|
#include "DNA_object_types.h"#include "BLI_linklist_stack.h"#include "BLI_math_geom.h"#include "BLI_math_vector.h"#include "BLI_memarena.h"#include "BLI_stack.h"#include "BLI_vector.hh"#include "BKE_context.hh"#include "BKE_editmesh.hh"#include "BKE_editmesh_bvh.hh"#include "BKE_layer.hh"#include "BKE_report.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_types.hh"#include "UI_interface_layout.hh"#include "UI_resources.hh"#include "ED_mesh.hh"#include "ED_screen.hh"#include "mesh_intern.hh"#include "tools/bmesh_boolean.hh"#include "tools/bmesh_intersect.hh"#include "tools/bmesh_separate.hh"Go to the source code of this file.
Classes | |
| struct | LinkBase |
Macros | |
| #define | USE_NET_ISLAND_CONNECT |
Functions | |
| static int | bm_face_isect_self (BMFace *f, void *) |
| static int | bm_face_isect_pair (BMFace *f, void *) |
| static int | bm_face_isect_pair_swap (BMFace *f, void *) |
| static void | edbm_intersect_select (BMEditMesh *em, Mesh *mesh, bool do_select) |
Boolean Intersect | |
| |
| static wmOperatorStatus | edbm_intersect_boolean_exec (bContext *C, wmOperator *op) |
| static void | edbm_intersect_boolean_ui (bContext *, wmOperator *op) |
| void | MESH_OT_intersect_boolean (wmOperatorType *ot) |
Face Split by Edges | |
| static void | bm_face_split_by_edges (BMesh *bm, BMFace *f, const char hflag, Vector< BMEdge *, 128 > *edge_net_temp_buf) |
| static bool | bm_vert_in_faces_radial (BMVert *v, BMEdge *e_radial, BMFace *f_ignore) |
| static void | ghash_insert_face_edge_link (GHash *gh, BMFace *f_key, BMEdge *e_val, MemArena *mem_arena) |
| static int | bm_edge_sort_length_cb (const void *e_a_v, const void *e_b_v) |
| static void | bm_face_split_by_edges_island_connect (BMesh *bm, BMFace *f, LinkNode *e_link, const int e_link_len, MemArena *mem_arena_edgenet) |
| static BMEdge * | bm_face_split_edge_find (BMEdge *e_a, BMFace *f_a, BMVert *v_pivot, BMFace **ftable, const int ftable_len, float r_v_pivot_co[3], float *r_v_pivot_fac) |
| static wmOperatorStatus | edbm_face_split_by_edges_exec (bContext *C, wmOperator *) |
| void | MESH_OT_face_split_by_edges (wmOperatorType *ot) |
Simple Intersect (self-intersect) | |
Cut intersections into geometry. | |
| enum | { ISECT_SEL = 0 , ISECT_SEL_UNSEL = 1 } |
| enum | { ISECT_SEPARATE_ALL = 0 , ISECT_SEPARATE_CUT = 1 , ISECT_SEPARATE_NONE = 2 } |
| enum | { ISECT_SOLVER_FAST = 0 , ISECT_SOLVER_EXACT = 1 } |
| static wmOperatorStatus | edbm_intersect_exec (bContext *C, wmOperator *op) |
| static void | edbm_intersect_ui (bContext *, wmOperator *op) |
| void | MESH_OT_intersect (wmOperatorType *ot) |
| #define USE_NET_ISLAND_CONNECT |
Definition at line 42 of file editmesh_intersect.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| ISECT_SEPARATE_ALL | |
| ISECT_SEPARATE_CUT | |
| ISECT_SEPARATE_NONE | |
Definition at line 127 of file editmesh_intersect.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| ISECT_SEL | |
| ISECT_SEL_UNSEL | |
Definition at line 122 of file editmesh_intersect.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| ISECT_SOLVER_FAST | |
| ISECT_SOLVER_EXACT | |
Definition at line 133 of file editmesh_intersect.cc.
|
static |
Definition at line 606 of file editmesh_intersect.cc.
References BM_edge_calc_length_squared().
Referenced by bm_face_split_by_edges_island_connect().
|
static |
Compare selected/unselected.
Definition at line 60 of file editmesh_intersect.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and BM_ELEM_SELECT.
Referenced by BMD_mesh_intersection(), edbm_intersect_boolean_exec(), and edbm_intersect_exec().
|
static |
A flipped version of bm_face_isect_pair use for boolean 'difference', which depends on order.
Definition at line 75 of file editmesh_intersect.cc.
References BM_elem_flag_test, BM_ELEM_HIDDEN, and BM_ELEM_SELECT.
Referenced by edbm_intersect_boolean_exec().
|
static |
Compare selected with itself.
Definition at line 49 of file editmesh_intersect.cc.
References BM_elem_flag_test, and BM_ELEM_SELECT.
Referenced by edbm_intersect_exec().
|
static |
Definition at line 486 of file editmesh_intersect.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, BLI_SMALLSTACK_DECLARE, BLI_SMALLSTACK_IS_EMPTY, BLI_SMALLSTACK_POP_EX, BLI_SMALLSTACK_PUSH, BLI_SMALLSTACK_SWAP, bm, BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_flag_disable, BM_elem_flag_test, BM_elem_index_get, BM_elem_index_set, BM_FACE_FIRST_LOOP, BM_face_select_set(), BM_face_split_edgenet(), BM_ITER_ELEM, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), e, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), BMLoop::next, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), BMLoop::v, and v.
Referenced by edbm_face_split_by_edges_exec().
|
static |
Definition at line 620 of file editmesh_intersect.cc.
References AT, BLI_assert_msg, BLI_memarena_alloc(), bm, BM_edge_face_pair(), BM_edge_select_set(), bm_edge_sort_length_cb(), BM_face_select_set(), BM_face_share_vert_count(), BM_face_split_edgenet(), BM_face_split_edgenet_connect_islands(), BM_faces_join(), i, LinkNode::link, and LinkNode::next.
Referenced by edbm_face_split_by_edges_exec().
|
static |
Check if v_pivot should be spliced into an existing edge.
Detect one of 3 cases:
Definition at line 696 of file editmesh_intersect.cc.
References BLI_assert, BLI_SMALLSTACK_DECLARE, BLI_SMALLSTACK_POP, BLI_SMALLSTACK_PUSH, BM_DISK_EDGE_NEXT, BM_edge_exists(), BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_index_get, BM_ELEM_INTERNAL_TAG, BM_FACE_FIRST_LOOP, CLAMP, BMVert::co, copy_v3_v3(), BMLoop::e, BMVert::e, BMLoop::f, FLT_MAX, interp_v3_v3v3(), len_squared_v3v3(), line_point_factor_v3(), BMLoop::next, BMLoop::radial_next, UNLIKELY, UNUSED_VARS_NDEBUG, BMEdge::v1, and BMEdge::v2.
Referenced by edbm_face_split_by_edges_exec().
Check if a vert is in any of the faces connected to the edge, f_ignore is a face we happen to know isn't shared by the vertex.
Definition at line 557 of file editmesh_intersect.cc.
References BLI_assert, BM_vert_in_face(), BMLoop::f, BMEdge::l, BMLoop::radial_next, and v.
Referenced by edbm_face_split_by_edges_exec().
|
static |
Definition at line 802 of file editmesh_intersect.cc.
References angle_signed_on_axis_v3v3v3_v3(), BKE_bmbvh_find_face_closest(), BKE_bmbvh_free(), BKE_bmbvh_new(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BLI_assert, BLI_ghash_free(), BLI_ghash_ptr_new(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), BLI_memarena_clear(), BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_SMALLSTACK_DECLARE, BLI_SMALLSTACK_IS_EMPTY, BLI_SMALLSTACK_POP, BLI_SMALLSTACK_PUSH, BLI_stack_free(), BLI_stack_is_empty(), BLI_stack_new, BLI_stack_pop(), BLI_stack_push(), bm, BMEditMesh::bm, BM_EDGE, BM_edge_is_wire(), BM_edge_other_vert(), BM_edge_split(), BM_EDGES_OF_MESH, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_index_get, BM_elem_index_set, BM_ELEM_INTERNAL_TAG, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, bm_face_split_by_edges(), bm_face_split_by_edges_island_connect(), bm_face_split_edge_find(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_ITER_MESH_INDEX, BM_LOOPS_OF_VERT, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_vert_in_face(), bm_vert_in_faces_radial(), BM_vert_splice(), BM_VERTS_OF_EDGE, BM_VERTS_OF_MESH, BMBVH_RESPECT_SELECT, C, BMVert::co, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), dot_v3v3(), e, EDBM_update(), BMLoop::f, fabsf, FLT_MAX, ghash_insert_face_edge_link(), GHASH_ITER, i, l, LinkNode::link, LinkBase::list, LinkBase::list_len, BMEditMesh::looptris, mem_arena, mid_v3_v3v3(), LinkNode::next, normalize_v3(), OPERATOR_FINISHED, params, sub_v3_v3v3(), v, and BMEdge::v1.
Referenced by MESH_OT_face_split_by_edges().
|
static |
Definition at line 341 of file editmesh_intersect.cc.
References BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, bm_face_isect_pair(), bm_face_isect_pair_swap(), BM_mesh_boolean(), BM_mesh_intersect(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), edbm_intersect_select(), eps, ISECT_SOLVER_EXACT, BMEditMesh::looptris, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), RPT_WARNING, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and BMesh::totfacesel.
Referenced by MESH_OT_intersect_boolean().
|
static |
Definition at line 403 of file editmesh_intersect.cc.
References ISECT_SOLVER_EXACT, wmOperator::layout, uiLayout::prop(), wmOperator::ptr, RNA_enum_get(), uiLayout::row(), uiLayout::separator(), UI_ITEM_NONE, UI_ITEM_R_EXPAND, uiLayout::use_property_decorate_set(), and uiLayout::use_property_split_set().
Referenced by MESH_OT_intersect_boolean().
|
static |
Definition at line 138 of file editmesh_intersect.cc.
References BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BMEditMesh::bm, BM_elem_cb_check_hflag_enabled_simple, BM_ELEM_SELECT, bm_face_isect_pair(), bm_face_isect_self(), BM_mesh_boolean_knife(), BM_mesh_intersect(), BM_mesh_separate_faces(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), edbm_intersect_select(), eps, ISECT_SEL, ISECT_SEPARATE_ALL, ISECT_SEPARATE_CUT, ISECT_SOLVER_EXACT, BMEditMesh::looptris, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_float_get(), RPT_WARNING, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and BMesh::totfacesel.
Referenced by MESH_OT_intersect().
|
static |
Use for intersect and boolean.
Definition at line 89 of file editmesh_intersect.cc.
References BMEditMesh::bm, BM_EDGE, BM_edge_select_set(), BM_EDGES_OF_MESH, BM_elem_flag_test, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, BM_ITER_MESH, BM_mesh_elem_hflag_disable_all(), BM_VERT, e, EDBM_selectmode_flush(), EDBM_update(), EDBM_uvselect_clear(), params, SCE_SELECT_EDGE, SCE_SELECT_VERTEX, and BMesh::selectmode.
Referenced by edbm_intersect_boolean_exec(), and edbm_intersect_exec().
|
static |
Definition at line 243 of file editmesh_intersect.cc.
References ISECT_SOLVER_EXACT, wmOperator::layout, uiLayout::prop(), wmOperator::ptr, RNA_enum_get(), uiLayout::row(), uiLayout::separator(), UI_ITEM_NONE, UI_ITEM_R_EXPAND, uiLayout::use_property_decorate_set(), and uiLayout::use_property_split_set().
Referenced by MESH_OT_intersect().
|
static |
Definition at line 580 of file editmesh_intersect.cc.
References BLI_ghash_ensure_p(), BLI_memarena_alloc(), LinkNode::link, LinkBase::list, LinkBase::list_len, mem_arena, and LinkNode::next.
Referenced by edbm_face_split_by_edges_exec().
| void MESH_OT_face_split_by_edges | ( | wmOperatorType * | ot | ) |
Definition at line 1070 of file editmesh_intersect.cc.
References ED_operator_editmesh(), edbm_face_split_by_edges_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_intersect | ( | wmOperatorType * | ot | ) |
Definition at line 268 of file editmesh_intersect.cc.
References ED_operator_editmesh(), edbm_intersect_exec(), edbm_intersect_ui(), ISECT_SEL, ISECT_SEL_UNSEL, ISECT_SEPARATE_ALL, ISECT_SEPARATE_CUT, ISECT_SEPARATE_NONE, ISECT_SOLVER_EXACT, ISECT_SOLVER_FAST, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), and RNA_def_float_distance().
Referenced by ED_operatortypes_mesh().
| void MESH_OT_intersect_boolean | ( | wmOperatorType * | ot | ) |
Definition at line 428 of file editmesh_intersect.cc.
References BMESH_ISECT_BOOLEAN_DIFFERENCE, BMESH_ISECT_BOOLEAN_ISECT, BMESH_ISECT_BOOLEAN_UNION, ED_operator_editmesh(), edbm_intersect_boolean_exec(), edbm_intersect_boolean_ui(), ISECT_SOLVER_EXACT, ISECT_SOLVER_FAST, OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), RNA_def_enum(), and RNA_def_float_distance().
Referenced by ED_operatortypes_mesh().