|
Blender V4.3
|
Classes | |
| struct | BooleanOpParameters |
Enumerations | |
| enum class | Solver { MeshArr = 0 , Float = 1 } |
| enum class | Operation { Intersect = 0 , Union = 1 , Difference = 2 } |
Functions | |
| Mesh * | mesh_boolean (Span< const Mesh * > meshes, Span< float4x4 > transforms, const float4x4 &target_transform, Span< Array< short > > material_remaps, BooleanOpParameters op_params, Solver solver, Vector< int > *r_intersecting_edges) |
Float Boolean | |
| static int | face_boolean_operand (BMFace *f, void *) |
| static BMesh * | mesh_bm_concat (Span< const Mesh * > meshes, Span< float4x4 > transforms, const float4x4 &target_transform, Span< Array< short > > material_remaps, Array< std::array< BMLoop *, 3 > > &r_looptris) |
| static int | operation_to_float_mode (const Operation operation) |
| static Mesh * | mesh_boolean_float (Span< const Mesh * > meshes, Span< float4x4 > transforms, const float4x4 &target_transform, Span< Array< short > > material_remaps, const int boolean_mode, Vector< int > *) |
|
strong |
| Enumerator | |
|---|---|
| Intersect | |
| Union | |
| Difference | |
Definition at line 26 of file GEO_mesh_boolean.hh.
|
strong |
Specifies which solver to use.
| Enumerator | |
|---|---|
| MeshArr | The exact solver based on the Mesh Arrangements for Solid Geometry paper, by Zhou, Grinspun, Zorin, and Jacobson. |
| Float | The original BMesh floating point solver. |
Definition at line 16 of file GEO_mesh_boolean.hh.
Function use to say what operand a face is part of, based on the BM_FACE_TAG, which is set inbm_mesh_create`.
Definition at line 897 of file geometry/intern/mesh_boolean.cc.
References BM_elem_flag_test, BM_FACE_TAG, and face_boolean_operand().
Referenced by face_boolean_operand(), and mesh_boolean_float().
|
static |
Definition at line 918 of file geometry/intern/mesh_boolean.cc.
References blender::Span< T >::begin(), BLI_assert, BLI_assert_unreachable, bm, BM_elem_flag_enable, BM_FACE, BM_face_normal_flip_ex(), BM_FACE_TAG, BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_bm_from_me(), BM_mesh_calc_tessellation_beauty(), BM_mesh_copy_init_customdata_from_mesh_array(), BM_mesh_create(), BM_mesh_elem_table_ensure(), BM_VERTS_OF_MESH, BMeshFromMeshParams::calc_face_normal, CD_MDISPS, BMVert::co, copy_v3_v3(), CustomData_get_offset(), BMesh::ftable, blender::Span< T >::index_range(), blender::math::invert(), blender::math::is_negative(), BMesh::ldata, BMFace::mat_nr, mesh_bm_concat(), negate_v3(), BMFace::no, normalize_v3(), poly_to_tri_count(), blender::Span< T >::size(), size(), BMAllocTemplate::totedge, BMAllocTemplate::totface, BMesh::totface, BMAllocTemplate::totloop, BMesh::totloop, BMAllocTemplate::totvert, blender::math::transform_direction(), and blender::math::transform_point().
Referenced by mesh_bm_concat(), and mesh_boolean_float().
| Mesh * blender::geometry::boolean::mesh_boolean | ( | Span< const Mesh * > | meshes, |
| Span< float4x4 > | transforms, | ||
| const float4x4 & | target_transform, | ||
| Span< Array< short > > | material_remaps, | ||
| BooleanOpParameters | op_params, | ||
| Solver | solver, | ||
| Vector< int > * | r_intersecting_edges ) |
Do a mesh boolean operation directly on meshes. Boolean operations operate on the volumes enclosed by the operands. If is only one operand, the non-float versions will do self-intersection and remove internal faces. If there are more than two meshes, the first mesh is operand 0 and the rest of the meshes are operand 1 (i.e., as if all of operands 1, ... are joined into one mesh. The exact solvers assume that the meshes are PWN (piecewise winding number, which approximately means that the meshes are enclosed watertight volumes, and all edges are manifold, though there are allowable exceptions to that last condition). If the meshes don't satisfy those conditions, all solvers will try to use ray-shooting to determine whether particular faces survive or not. This may or may not work in the way the user hopes.
| meshes | The meshes that are operands of the boolean operation. |
| transforms | An array of transform matrices used for each mesh's positions. |
| target_transform | the result needs to be transformed by this. |
| material_remaps | An array of maps from material slot numbers in the corresponding mesh to the material slot in the first mesh. It is OK for material_remaps or any of its constituent arrays to be empty. A -1 value means that the original index should be used with no mapping. |
| op_params | Specifies the boolean operation and assumptions we can make. |
| solver | which solver to use |
| r_intersecting_edges | Vector to store indices of edges on the resulting mesh in. These 'new' edges are the result of the intersections. |
Definition at line 1148 of file geometry/intern/mesh_boolean.cc.
References BLI_assert_unreachable, blender::geometry::boolean::BooleanOpParameters::boolean_mode, mesh_boolean(), mesh_boolean_float(), blender::geometry::boolean::BooleanOpParameters::no_self_intersections, operation_to_float_mode(), and blender::geometry::boolean::BooleanOpParameters::watertight.
Referenced by mesh_boolean(), and blender::nodes::node_geo_boolean_cc::node_geo_exec().
|
static |
Definition at line 1062 of file geometry/intern/mesh_boolean.cc.
References BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_mesh_from_bmesh_for_eval_nomain(), BLI_assert, BLI_assert_unreachable, bm, BM_mesh_free(), BM_mesh_intersect(), blender::IndexRange::drop_back(), face_boolean_operand(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), mesh_bm_concat(), mesh_boolean_float(), result, and blender::Span< T >::size().
Referenced by mesh_boolean(), and mesh_boolean_float().
Definition at line 1048 of file geometry/intern/mesh_boolean.cc.
References BLI_assert_unreachable, BMESH_ISECT_BOOLEAN_DIFFERENCE, BMESH_ISECT_BOOLEAN_ISECT, BMESH_ISECT_BOOLEAN_NONE, BMESH_ISECT_BOOLEAN_UNION, and operation_to_float_mode().
Referenced by mesh_boolean(), and operation_to_float_mode().