45 operator bool()
const {
return valid(); }
184 const AffineXf3f* rigidB2A =
nullptr );
#define MRMESH_API
Definition MRMeshFwd.h:85
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:790
Contours3f findIntersectionContours(const Mesh &meshA, const Mesh &meshB, const AffineXf3f *rigidB2A=nullptr)
returns intersection contours of given meshes
BooleanResult boolean(const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const AffineXf3f *rigidB2A, BooleanResultMapper *mapper=nullptr, ProgressCallback cb={})
Performs CSG operation on two meshes.
BooleanResult forceBoolean(const Mesh &meshA, const Mesh &meshB, BooleanOperation operation, const BooleanParameters ¶ms={})
BooleanOperation
Definition MRBooleanOperation.h:20
Expected< Mesh > selfBoolean(const Mesh &mesh, FaceMap *new2Old=nullptr)
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.
void convertIntFloatAllVerts(Mesh &mesh, const CoordinateConverters &conv)
Vector< ContinuousContour > ContinuousContours
Definition MRIntersectionContour.h:15
Contours3< float > Contours3f
Definition MRMeshFwd.h:388
tl::expected< T, E > Expected
Definition MRExpected.h:31
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRMeshBoolean.h:102
BooleanPreCutResult * outPreCutB
Optional precut output of meshB, if present - does not perform boolean and just return them.
Definition MRMeshBoolean.h:113
ProgressCallback cb
Definition MRMeshBoolean.h:127
bool forceCut
Definition MRMeshBoolean.h:125
bool mergeAllNonIntersectingComponents
Definition MRMeshBoolean.h:120
std::vector< EdgeLoop > * outCutEdges
Optional output cut edges of booleaned meshes.
Definition MRMeshBoolean.h:116
const AffineXf3f * rigidB2A
Transform from mesh B space to mesh A space.
Definition MRMeshBoolean.h:104
BooleanResultMapper * mapper
Optional output structure to map mesh A and mesh B topology to result mesh topology.
Definition MRMeshBoolean.h:107
BooleanPreCutResult * outPreCutA
Optional precut output of meshA, if present - does not perform boolean and just return them.
Definition MRMeshBoolean.h:110
no version of the function with rvalue-referenced meshes, because meshes' copies are currently used f...
Definition MRMeshBoolean.h:72
size_t meshAVertsNum
the number of vertices of mesh A before any cut
Definition MRMeshBoolean.h:86
std::optional< AffineXf3f > rigidB2A
a copy of the boolean's transformation from mesh B to mesh A
Definition MRMeshBoolean.h:83
SortIntersectionsData sortData(const Mesh &otherMesh) const
Definition MRMeshBoolean.h:93
Mesh mesh
Definition MRMeshBoolean.h:73
ConvertToIntVector toInt
the boolean's conversion of the coordinates of both meshes to integers
Definition MRMeshBoolean.h:80
bool isMeshA
whether mesh is mesh A of the boolean
Definition MRMeshBoolean.h:89
ContinuousContours intersections
the boolean's ordered intersections of both meshes, without the closed contours of two points
Definition MRMeshBoolean.h:77
OneMeshContours contours
Definition MRMeshBoolean.h:74
Structure to map old mesh BitSets to new.
Definition MRBooleanOperation.h:59
vertices and points representing mesh intersection result
Definition MRMeshBoolean.h:167
VertBitSet meshBVerts
Definition MRMeshBoolean.h:169
VertBitSet meshAVerts
Definition MRMeshBoolean.h:168
std::vector< Vector3f > intersectionPoints
Definition MRMeshBoolean.h:170
Structure contain boolean result.
Definition MRMeshBoolean.h:30
Mesh mesh
Result mesh of boolean operation, if error occurred it would be empty.
Definition MRMeshBoolean.h:32
bool valid() const
Returns true if boolean succeed, false otherwise.
Definition MRMeshBoolean.h:40
FaceBitSet meshBBadContourFaces
If input contours have intersections, this face bit set presents faces of mesh B on which contours in...
Definition MRMeshBoolean.h:36
std::string errorString
Holds error message, empty if boolean succeed.
Definition MRMeshBoolean.h:38
FaceBitSet meshABadContourFaces
If input contours have intersections, this face bit set presents faces of mesh A on which contours in...
Definition MRMeshBoolean.h:34
Mesh * operator->()
Definition MRMeshBoolean.h:43
Mesh & operator*()
Definition MRMeshBoolean.h:41
const Mesh & operator*() const
Definition MRMeshBoolean.h:42
const Mesh * operator->() const
Definition MRMeshBoolean.h:44
translate then scale float-to-int coordinate converter
Definition MRPrecisePredicates3.h:100
this struct contains coordinate converters float-int-float
Definition MRPrecisePredicates3.h:145
Special data type for MR::cutMesh: the intersections of all contours in one array,...
Definition MROneMeshContours.h:90
Special data to sort intersections more accurate.
Definition MROneMeshContours.h:18