Easy3D 2.5.3
OverlappingFaces Class Reference

Detects/Removes duplicate and folding faces for a triangle mesh. More...

#include <easy3d/algo_ext/overlapping_faces.h>

Public Member Functions

void detect (SurfaceMesh *mesh, std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > &duplicate_faces, std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > &folding_faces, double dist_threshold=1e-6)
 Detects duplicate faces and folding faces. More...
 
unsigned int remove (SurfaceMesh *mesh, bool folding_faces=false, double dist_threshold=1e-6)
 Removes duplicate faces and and folding faces. More...
 

Detailed Description

Detects/Removes duplicate and folding faces for a triangle mesh.

Member Function Documentation

◆ detect()

void detect ( SurfaceMesh mesh,
std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > &  duplicate_faces,
std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > &  folding_faces,
double  dist_threshold = 1e-6 
)

Detects duplicate faces and folding faces.

Two triangle faces are said duplicate if they have the same geometry (vertices within a distance threshold). Two triangle faces are said folding if they are coplanar, share one edge (i.e., have the same edge geometry), and partially overlap.

Parameters
meshThe input surface mesh.
duplicate_facesReturns the duplicate face pairs found.
folding_facesReturns the folding face pairs found.
dist_thresholdTwo vertices are considered coincident if there distance is smaller than it.
Precondition
mesh.is_triangle_mesh().

◆ remove()

unsigned int remove ( SurfaceMesh mesh,
bool  folding_faces = false,
double  dist_threshold = 1e-6 
)

Removes duplicate faces and and folding faces.

Two triangle faces are said duplicate if they have the same geometry (vertices within a distance threshold). Two triangle faces are said folding if they are coplanar, share one edge (i.e., have the same edge geometry), and partially overlap.

Parameters
meshThe input surface mesh.
folding_facestrue also to remove folding faces.
Returns
The number of faces that have been deleted.
Precondition
mesh.is_triangle_mesh().

The documentation for this class was generated from the following files: