pmp-library  1.2.1
SurfaceFeatures Class Reference

Detect and mark feature edges based on boundary or dihedral angle. More...

#include <pmp/algorithms/SurfaceFeatures.h>

Public Member Functions

 SurfaceFeatures (SurfaceMesh &mesh)
 Construct with mesh to be analyzed. More...
 
void clear ()
 Clear feature and boundary edges. More...
 
size_t detect_boundary ()
 Mark all boundary edges as features. More...
 
size_t detect_angle (Scalar angle)
 Mark edges with dihedral angle larger than angle as feature. More...
 

Detailed Description

Detect and mark feature edges based on boundary or dihedral angle.

Constructor & Destructor Documentation

◆ SurfaceFeatures()

Construct with mesh to be analyzed.

Adds two bool properties to the mesh if they are not already existing:

  • "e:feature" to mark feature edges
  • "v:feature" to mark feature vertices.
Note
The class never removes the marker properties so that other algorithms can re-use this information. Cleaning up the properties when they are no longer needed is the responsibility of the caller.

Member Function Documentation

◆ clear()

void clear ( )

Clear feature and boundary edges.

Sets all "e:feature" and "v:feature" properties to false.

Note
This does not remove the corresponding property arrays.

◆ detect_angle()

size_t detect_angle ( Scalar  angle)

Mark edges with dihedral angle larger than angle as feature.

Returns
The number of feature edges detected.

◆ detect_boundary()

size_t detect_boundary ( )

Mark all boundary edges as features.

Returns
The number of boudary edges detected.