Easy3D 2.5.3
SelfIntersection Class Reference

Detects and resolves self-intersection for surface mesh. More...

#include <easy3d/algo_ext/self_intersection.h>

Public Member Functions

std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > detect (SurfaceMesh *mesh, bool construct=false)
 Detect intersecting face pairs. More...
 
bool remesh (SurfaceMesh *mesh, bool stitch)
 Detect and remesh the intersecting faces. More...
 

Detailed Description

Detects and resolves self-intersection for surface mesh.

Given a triangle mesh compute a new mesh which is the same as the input mesh except that any self-intersecting triangles have been subdivided (new vertices and face created) so that the self-intersection contour lies exactly on edges in the the new mesh. New vertices will appear in original faces or on original edges. New vertices on edges are "merged" only across original faces sharing that edge. This means that if the input triangle mesh is a closed manifold the output will be too.

Known issues: If an existing edge lies exactly on another face then any resulting additional vertices along that edge may not get properly connected so that the output mesh has the same global topology.

Member Function Documentation

◆ detect()

std::vector< std::pair< SurfaceMesh::Face, SurfaceMesh::Face > > detect ( SurfaceMesh mesh,
bool  construct = false 
)

Detect intersecting face pairs.

Parameters
meshThe input mesh.
constructIf true, also construct the intersecting geometry.
Returns
The intersecting face pairs.

◆ remesh()

bool remesh ( SurfaceMesh mesh,
bool  stitch 
)

Detect and remesh the intersecting faces.

Parameters
meshThe input mesh. If self intersection exists, it carries the remeshed model. Otherwise it remains unchanged.
stitchStitch the borders
Returns
true if remesh actually occurred (i.e., self intersection was detected).

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