Blender
V3.3
|
#include "BLI_array.hh"
#include "BLI_math.h"
#include "BLI_math_mpq.hh"
#include "BLI_mesh_boolean.hh"
#include "BLI_mesh_intersect.hh"
#include "bmesh.h"
#include "bmesh_boolean.h"
#include "bmesh_edgesplit.h"
#include "PIL_time.h"
Go to the source code of this file.
Namespaces | |
blender | |
blender::meshintersect | |
Functions | |
bool | BM_mesh_boolean (BMesh *UNUSED(bm), struct BMLoop *(*looptris)[3], const int UNUSED(looptris_tot), int(*test_fn)(BMFace *, void *), void *UNUSED(user_data), const int UNUSED(nshapes), const bool UNUSED(use_self), const bool UNUSED(keep_hidden), const bool UNUSED(hole_tolerant), const int UNUSED(boolean_mode)) |
bool | BM_mesh_boolean_knife (BMesh *UNUSED(bm), struct BMLoop *(*looptris)[3], const int UNUSED(looptris_tot), int(*test_fn)(BMFace *, void *), void *UNUSED(user_data), const int UNUSED(nshapes), const bool UNUSED(use_self), const bool UNUSED(use_separate_all), const bool UNUSED(hole_tolerant), const bool UNUSED(keep_hidden)) |
Main functions for boolean on a BMesh (used by the tool and modifier)
Definition in file bmesh_boolean.cc.
bool BM_mesh_boolean | ( | BMesh * | UNUSEDbm, |
struct BMLoop *(*) | looptris[3], | ||
const int | UNUSEDlooptris_tot, | ||
int(*)(BMFace *, void *) | test_fn, | ||
void * | UNUSEDuser_data, | ||
const int | UNUSEDnshapes, | ||
const bool | UNUSEDuse_self, | ||
const bool | UNUSEDkeep_hidden, | ||
const bool | UNUSEDhole_tolerant, | ||
const int | UNUSEDboolean_mode | ||
) |
Perform the boolean operation specified by boolean_mode on the mesh bm. The inputs to the boolean operation are either one sub-mesh (if use_self is true), or two sub-meshes. The sub-meshes are specified by providing a test_fn which takes a face and the supplied user_data and says with 'side' of the boolean operation that face is for: 0 for the first side (side A), 1 for the second side (side B), and -1 if the face is to be ignored completely in the boolean operation.
If use_self is true, all operations do the same: the sub-mesh is self-intersected and all pieces inside that result are removed. Otherwise, the operations can be one of BMESH_ISECT_BOOLEAN_ISECT, BMESH_ISECT_BOOLEAN_UNION, or BMESH_ISECT_BOOLEAN_DIFFERENCE.
(The actual library function called to do the boolean is internally capable of handling n-ary operands, so maybe in the future we can expose that functionality to users.)
Definition at line 469 of file bmesh_boolean.cc.
References UNUSED_VARS.
Referenced by edbm_intersect_boolean_exec(), and sculpt_gesture_apply_trim().
bool BM_mesh_boolean_knife | ( | BMesh * | UNUSEDbm, |
struct BMLoop *(*) | looptris[3], | ||
const int | UNUSEDlooptris_tot, | ||
int(*)(BMFace *, void *) | test_fn, | ||
void * | UNUSEDuser_data, | ||
const int | UNUSEDnshapes, | ||
const bool | UNUSEDuse_self, | ||
const bool | UNUSEDuse_separate_all, | ||
const bool | UNUSEDhole_tolerant, | ||
const bool | UNUSEDkeep_hidden | ||
) |
Perform a Knife Intersection operation on the mesh bm. There are either one or two operands, the same as described above for BM_mesh_boolean(). If use_separate_all is true, each edge that is created from the intersection should be used to separate all its incident faces. TODO: implement that. TODO: need to ensure that "selected/non-selected" flag of original faces gets propagated to the intersection result faces.
Definition at line 492 of file bmesh_boolean.cc.
References UNUSED_VARS.
Referenced by edbm_intersect_exec().