MeshLib C++ Docs
Loading...
Searching...
No Matches
Tunnel Detector

Classes

struct  MR::DetectTunnelSettings
 

Functions

MRMESH_API Expected< std::vector< EdgeLoop > > MR::detectBasisTunnels (const MeshPart &mp, EdgeMetric metric={}, ProgressCallback progressCallback={})
 
MRMESH_API Expected< EdgeLoop > MR::findSmallestMetricCoLoop (const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
 
MRMESH_API Expected< EdgeLoop > MR::findShortestCoLoop (const MeshPart &mp, const EdgeLoop &loop)
 same as findMinimalCoLoop with euclidean edge length metric
 
MRMESH_API std::vector< EdgeLoop > MR::findSmallestMetricEquivalentLoops (const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
 
MRMESH_API std::vector< EdgeLoop > MR::findShortestEquivalentLoops (const MeshPart &mp, const EdgeLoop &loop)
 same as findSmallestMetricEquivalentLoops with euclidean edge length metric
 
MRMESH_API Expected< FaceBitSet > MR::detectTunnelFaces (const MeshPart &mp, const DetectTunnelSettings &settings={})
 

Detailed Description

Function Documentation

◆ detectBasisTunnels()

MRMESH_API Expected< std::vector< EdgeLoop > > MR::detectBasisTunnels ( const MeshPart & mp,
EdgeMetric metric = {},
ProgressCallback progressCallback = {} )

#include <MRTunnelDetector.h>

detects all not-contractible-in-point and not-equivalent tunnel loops on the mesh; trying to include in the loops the edges with the smallest metric; if no metric is given then discreteMinusAbsMeanCurvatureMetric will be used

◆ detectTunnelFaces()

MRMESH_API Expected< FaceBitSet > MR::detectTunnelFaces ( const MeshPart & mp,
const DetectTunnelSettings & settings = {} )

#include <MRTunnelDetector.h>

returns tunnels as a number of faces; if you remove these faces and patch every boundary with disk, then the surface will be topology equivalent to sphere

◆ findShortestCoLoop()

MRMESH_API Expected< EdgeLoop > MR::findShortestCoLoop ( const MeshPart & mp,
const EdgeLoop & loop )

#include <MRTunnelDetector.h>

same as findMinimalCoLoop with euclidean edge length metric

◆ findShortestEquivalentLoops()

MRMESH_API std::vector< EdgeLoop > MR::findShortestEquivalentLoops ( const MeshPart & mp,
const EdgeLoop & loop )
nodiscard

#include <MRTunnelDetector.h>

same as findSmallestMetricEquivalentLoops with euclidean edge length metric

◆ findSmallestMetricCoLoop()

MRMESH_API Expected< EdgeLoop > MR::findSmallestMetricCoLoop ( const MeshTopology & topology,
const EdgeLoop & loop,
const EdgeMetric & metric,
const FaceBitSet * region = nullptr )

#include <MRTunnelDetector.h>

given not-separating loop on input, finds the loop (also not-separation) that 1) goes from left side of input loop 2) returns to the input loop from its right side 3) goes along the input loop to become closed such that the resulting loop has minimal sum of given metric for its edges; edges 1) and 2) can be only inner or boundary to the given region (they must have region from left or from right)

◆ findSmallestMetricEquivalentLoops()

MRMESH_API std::vector< EdgeLoop > MR::findSmallestMetricEquivalentLoops ( const MeshTopology & topology,
const EdgeLoop & loop,
const EdgeMetric & metric,
const FaceBitSet * region = nullptr )
nodiscard

#include <MRTunnelDetector.h>

given not-separating loop on input, finds one or several loops such that 1) resulting loops together with input loop separate a part of mesh, 2) returned loops are oriented the same as input loop (and have the separated mesh part from the other side compared to input loop); 3) the sum of the given metric for their edges is minimal; 4) resulting edges can be only inner to the given region.