MeshLib
 
Loading...
Searching...
No Matches
MRBooleanOperation.h File Reference
#include "MRMeshFwd.h"
#include "MRVector.h"

Go to the source code of this file.

Typedefs

typedef MR_EXTERN_C_BEGIN enum MRBooleanOperation MRBooleanOperation
 Available CSG operations.
 
typedef enum MRBooleanResultMapperMapObject MRBooleanResultMapperMapObject
 Input object index enum.
 
typedef struct MRBooleanResultMapper MRBooleanResultMapper
 
typedef struct MRBooleanResultMapperMaps MRBooleanResultMapperMaps
 

Enumerations

enum  MRBooleanOperation {
  MRBooleanOperationInsideA = 0 , MRBooleanOperationInsideB , MRBooleanOperationOutsideA , MRBooleanOperationOutsideB ,
  MRBooleanOperationUnion , MRBooleanOperationIntersection , MRBooleanOperationDifferenceBA , MRBooleanOperationDifferenceAB ,
  MRBooleanOperationCount
}
 Available CSG operations. More...
 
enum  MRBooleanResultMapperMapObject { MRBooleanResultMapperMapObjectA , MRBooleanResultMapperMapObjectB , MRBooleanResultMapperMapObjectCount }
 Input object index enum. More...
 

Functions

MRMESHC_API MRBooleanResultMappermrBooleanResultMapperNew (void)
 creates a new BooleanResultMapper object
 
MRMESHC_API MRFaceBitSetmrBooleanResultMapperMapFaces (const MRBooleanResultMapper *mapper, const MRFaceBitSet *oldBS, MRBooleanResultMapperMapObject obj)
 Returns faces bitset of result mesh corresponding input one.
 
MRMESHC_API MRVertBitSetmrBooleanResultMapperMapVerts (const MRBooleanResultMapper *mapper, const MRVertBitSet *oldBS, MRBooleanResultMapperMapObject obj)
 Returns vertices bitset of result mesh corresponding input one.
 
MRMESHC_API MREdgeBitSetmrBooleanResultMapperMapEdges (const MRBooleanResultMapper *mapper, const MREdgeBitSet *oldBS, MRBooleanResultMapperMapObject obj)
 Returns edges bitset of result mesh corresponding input one.
 
MRMESHC_API MRFaceBitSetmrBooleanResultMapperNewFaces (const MRBooleanResultMapper *mapper)
 Returns only new faces that are created during boolean operation.
 
MRMESHC_API MRFaceBitSetmrBooleanResultMapperFilteredOldFaceBitSet (MRBooleanResultMapper *mapper, const MRFaceBitSet *oldBS, MRBooleanResultMapperMapObject obj)
 returns updated oldBS leaving only faces that has corresponding ones in result mesh
 
MRMESHC_API const MRBooleanResultMapperMapsmrBooleanResultMapperGetMaps (const MRBooleanResultMapper *mapper, MRBooleanResultMapperMapObject index)
 
MRMESHC_API const MRFaceMap mrBooleanResultMapperMapsCut2origin (const MRBooleanResultMapperMaps *maps)
 
MRMESHC_API const MRFaceMap mrBooleanResultMapperMapsCut2newFaces (const MRBooleanResultMapperMaps *maps)
 "after cut" faces to "after stitch" faces (1-1)
 
MRMESHC_API const MRWholeEdgeMap mrBooleanResultMapperMapsOld2newEdges (const MRBooleanResultMapperMaps *maps)
 "origin" edges to "after stitch" edges (1-1)
 
MRMESHC_API const MRVertMap mrBooleanResultMapperMapsOld2NewVerts (const MRBooleanResultMapperMaps *maps)
 "origin" vertices to "after stitch" vertices (1-1)
 
MRMESHC_API bool mrBooleanResultMapperMapsIdentity (const MRBooleanResultMapperMaps *maps)
 old topology indexes are valid if true
 
MRMESHC_API void mrBooleanResultMapperFree (MRBooleanResultMapper *mapper)
 deallocates a BooleanResultMapper object
 

Typedef Documentation

◆ MRBooleanOperation

Available CSG operations.

◆ MRBooleanResultMapper

typedef struct MRBooleanResultMapper MRBooleanResultMapper

◆ MRBooleanResultMapperMapObject

Input object index enum.

◆ MRBooleanResultMapperMaps

Enumeration Type Documentation

◆ MRBooleanOperation

Available CSG operations.

Enumerator
MRBooleanOperationInsideA 

Part of mesh A that is inside of mesh B

MRBooleanOperationInsideB 

Part of mesh B that is inside of mesh A

MRBooleanOperationOutsideA 

Part of mesh A that is outside of mesh B

MRBooleanOperationOutsideB 

Part of mesh B that is outside of mesh A

MRBooleanOperationUnion 

Union surface of two meshes (outside parts)

MRBooleanOperationIntersection 

Intersection surface of two meshes (inside parts)

MRBooleanOperationDifferenceBA 

Surface of mesh B - surface of mesh A (outside B - inside A)

MRBooleanOperationDifferenceAB 

Surface of mesh A - surface of mesh B (outside A - inside B)

MRBooleanOperationCount 

not a valid operation

◆ MRBooleanResultMapperMapObject

Input object index enum.

Enumerator
MRBooleanResultMapperMapObjectA 
MRBooleanResultMapperMapObjectB 
MRBooleanResultMapperMapObjectCount 

Function Documentation

◆ mrBooleanResultMapperFilteredOldFaceBitSet()

MRMESHC_API MRFaceBitSet * mrBooleanResultMapperFilteredOldFaceBitSet ( MRBooleanResultMapper * mapper,
const MRFaceBitSet * oldBS,
MRBooleanResultMapperMapObject obj )

returns updated oldBS leaving only faces that has corresponding ones in result mesh

◆ mrBooleanResultMapperFree()

MRMESHC_API void mrBooleanResultMapperFree ( MRBooleanResultMapper * mapper)

deallocates a BooleanResultMapper object

◆ mrBooleanResultMapperGetMaps()

MRMESHC_API const MRBooleanResultMapperMaps * mrBooleanResultMapperGetMaps ( const MRBooleanResultMapper * mapper,
MRBooleanResultMapperMapObject index )

◆ mrBooleanResultMapperMapEdges()

MRMESHC_API MREdgeBitSet * mrBooleanResultMapperMapEdges ( const MRBooleanResultMapper * mapper,
const MREdgeBitSet * oldBS,
MRBooleanResultMapperMapObject obj )

Returns edges bitset of result mesh corresponding input one.

◆ mrBooleanResultMapperMapFaces()

MRMESHC_API MRFaceBitSet * mrBooleanResultMapperMapFaces ( const MRBooleanResultMapper * mapper,
const MRFaceBitSet * oldBS,
MRBooleanResultMapperMapObject obj )

Returns faces bitset of result mesh corresponding input one.

◆ mrBooleanResultMapperMapsCut2newFaces()

MRMESHC_API const MRFaceMap mrBooleanResultMapperMapsCut2newFaces ( const MRBooleanResultMapperMaps * maps)

"after cut" faces to "after stitch" faces (1-1)

◆ mrBooleanResultMapperMapsCut2origin()

MRMESHC_API const MRFaceMap mrBooleanResultMapperMapsCut2origin ( const MRBooleanResultMapperMaps * maps)

"after cut" faces to "origin" faces this map is not 1-1, but N-1

◆ mrBooleanResultMapperMapsIdentity()

MRMESHC_API bool mrBooleanResultMapperMapsIdentity ( const MRBooleanResultMapperMaps * maps)

old topology indexes are valid if true

◆ mrBooleanResultMapperMapsOld2newEdges()

MRMESHC_API const MRWholeEdgeMap mrBooleanResultMapperMapsOld2newEdges ( const MRBooleanResultMapperMaps * maps)

"origin" edges to "after stitch" edges (1-1)

◆ mrBooleanResultMapperMapsOld2NewVerts()

MRMESHC_API const MRVertMap mrBooleanResultMapperMapsOld2NewVerts ( const MRBooleanResultMapperMaps * maps)

"origin" vertices to "after stitch" vertices (1-1)

◆ mrBooleanResultMapperMapVerts()

MRMESHC_API MRVertBitSet * mrBooleanResultMapperMapVerts ( const MRBooleanResultMapper * mapper,
const MRVertBitSet * oldBS,
MRBooleanResultMapperMapObject obj )

Returns vertices bitset of result mesh corresponding input one.

◆ mrBooleanResultMapperNew()

MRMESHC_API MRBooleanResultMapper * mrBooleanResultMapperNew ( void )

creates a new BooleanResultMapper object

◆ mrBooleanResultMapperNewFaces()

MRMESHC_API MRFaceBitSet * mrBooleanResultMapperNewFaces ( const MRBooleanResultMapper * mapper)

Returns only new faces that are created during boolean operation.