42 operator bool()
const {
return valid(); }
61 const AffineXf3f* rigidB2A,
BooleanResultMapper* mapper =
nullptr, ProgressCallback cb = {} );
63 const AffineXf3f* rigidB2A,
BooleanResultMapper* mapper =
nullptr, ProgressCallback cb = {} );
102 ProgressCallback
cb = {};
136 const AffineXf3f* rigidB2A =
nullptr );
MRMESH_API BooleanResult boolean(const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const AffineXf3f *rigidB2A, BooleanResultMapper *mapper=nullptr, ProgressCallback cb={})
Performs CSG operation on two meshes.
BooleanOperation
Definition MRBooleanOperation.h:20
std::vector< OneMeshContour > OneMeshContours
Special data type for MR::cutMesh.
Definition MRIntersectionContour.h:13
MRMESH_API Expected< BooleanResultPoints, std::string > getBooleanPoints(const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const AffineXf3f *rigidB2A=nullptr)
Returns the points of mesh boolean's result mesh.
tl::expected< T, E > Expected
Definition MRExpected.h:31
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
MRMESH_API Contours3f findIntersectionContours(const Mesh &meshA, const Mesh &meshB, const AffineXf3f *rigidB2A=nullptr)
returns intersection contours of given meshes
MRMESH_API void convertIntFloatAllVerts(Mesh &mesh, const CoordinateConverters &conv)
MRMESH_API Expected< Mesh > selfBoolean(const Mesh &mesh)
Definition MRMeshBoolean.h:77
BooleanPreCutResult * outPreCutB
Optional precut output of meshB, if present - does not perform boolean and just return them.
Definition MRMeshBoolean.h:88
ProgressCallback cb
Definition MRMeshBoolean.h:102
bool forceCut
Definition MRMeshBoolean.h:100
bool mergeAllNonIntersectingComponents
Definition MRMeshBoolean.h:95
std::vector< EdgeLoop > * outCutEdges
Optional output cut edges of booleaned meshes.
Definition MRMeshBoolean.h:91
const AffineXf3f * rigidB2A
Transform from mesh B space to mesh A space.
Definition MRMeshBoolean.h:79
BooleanResultMapper * mapper
Optional output structure to map mesh A and mesh B topology to result mesh topology.
Definition MRMeshBoolean.h:82
BooleanPreCutResult * outPreCutA
Optional precut output of meshA, if present - does not perform boolean and just return them.
Definition MRMeshBoolean.h:85
Definition MRMeshBoolean.h:67
Mesh mesh
Definition MRMeshBoolean.h:68
OneMeshContours contours
Definition MRMeshBoolean.h:69
Structure to map old mesh BitSets to new.
vertices and points representing mesh intersection result
Definition MRMeshBoolean.h:119
VertBitSet meshBVerts
Definition MRMeshBoolean.h:121
VertBitSet meshAVerts
Definition MRMeshBoolean.h:120
std::vector< Vector3f > intersectionPoints
Definition MRMeshBoolean.h:122
Structure contain boolean result.
Mesh mesh
Result mesh of boolean operation, if error occurred it would be empty.
Definition MRMeshBoolean.h:29
bool valid() const
Returns true if boolean succeed, false otherwise.
Definition MRMeshBoolean.h:37
FaceBitSet meshBBadContourFaces
If input contours have intersections, this face bit set presents faces of mesh B on which contours in...
Definition MRMeshBoolean.h:33
std::string errorString
Holds error message, empty if boolean succeed.
Definition MRMeshBoolean.h:35
FaceBitSet meshABadContourFaces
If input contours have intersections, this face bit set presents faces of mesh A on which contours in...
Definition MRMeshBoolean.h:31
Mesh * operator->()
Definition MRMeshBoolean.h:40
Mesh & operator*()
Definition MRMeshBoolean.h:38
const Mesh & operator*() const
Definition MRMeshBoolean.h:39
const Mesh * operator->() const
Definition MRMeshBoolean.h:41
this struct contains coordinate converters float-int-float
Definition MRPrecisePredicates3.h:61