MeshLib C++ Docs
Loading...
Searching...
No Matches
MRTunnelDetector.h
Go to the documentation of this file.
1#pragma once
2
4#include "MRExpected.h"
5#include <cfloat>
6
7namespace MR
8{
9
13
17MRMESH_API Expected<std::vector<EdgeLoop>> detectBasisTunnels( const MeshPart& mp, EdgeMetric metric = {}, ProgressCallback progressCallback = {} );
18
26 const FaceBitSet* region = nullptr );
27
29MRMESH_API Expected<EdgeLoop> findShortestCoLoop( const MeshPart& mp, const EdgeLoop& loop );
30
36[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findSmallestMetricEquivalentLoops( const MeshTopology& topology, const EdgeLoop& loop, const EdgeMetric& metric,
37 const FaceBitSet* region = nullptr );
38
40[[nodiscard]] MRMESH_API std::vector<EdgeLoop> findShortestEquivalentLoops( const MeshPart& mp, const EdgeLoop& loop );
41
43{
45 float maxTunnelLength = FLT_MAX;
46
49 int maxIters = 1;
50
56
59 bool buildCoLoops = true;
60
64
67};
68
71MRMESH_API Expected<FaceBitSet> detectTunnelFaces( const MeshPart& mp, const DetectTunnelSettings & settings = {} );
72
75MRMESH_API Expected<void> eliminateTunnels( Mesh& mesh, const FaceBitSet* region = {}, const DetectTunnelSettings& settings = {} );
76MRMESH_API Expected<void> eliminateTunnels( Mesh& mesh, const FillHoleNicelySettings& fillSettings, const FaceBitSet* region = {}, const DetectTunnelSettings& detectSettings = {} );
77
79
80}
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRMeshTopology.h:23
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:758
std::vector< EdgeId > EdgeLoop
Definition MRMeshFwd.h:150
tl::expected< T, E > Expected
Definition MRExpected.h:31
std::function< float(EdgeId)> EdgeMetric
Definition MRMeshFwd.h:588
Expected< EdgeLoop > findSmallestMetricCoLoop(const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
Expected< EdgeLoop > findShortestCoLoop(const MeshPart &mp, const EdgeLoop &loop)
same as findMinimalCoLoop with euclidean edge length metric
std::vector< EdgeLoop > findShortestEquivalentLoops(const MeshPart &mp, const EdgeLoop &loop)
same as findSmallestMetricEquivalentLoops with euclidean edge length metric
Expected< void > eliminateTunnels(Mesh &mesh, const FaceBitSet *region={}, const DetectTunnelSettings &settings={})
Expected< FaceBitSet > detectTunnelFaces(const MeshPart &mp, const DetectTunnelSettings &settings={})
std::vector< EdgeLoop > findSmallestMetricEquivalentLoops(const MeshTopology &topology, const EdgeLoop &loop, const EdgeMetric &metric, const FaceBitSet *region=nullptr)
Expected< std::vector< EdgeLoop > > detectBasisTunnels(const MeshPart &mp, EdgeMetric metric={}, ProgressCallback progressCallback={})
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRTunnelDetector.h:43
bool buildCoLoops
Definition MRTunnelDetector.h:59
EdgeMetric metric
Definition MRTunnelDetector.h:55
int maxIters
Definition MRTunnelDetector.h:49
bool filterEquivalentCoLoops
Definition MRTunnelDetector.h:63
float maxTunnelLength
maximal euclidean length of tunnel loops to detect
Definition MRTunnelDetector.h:45
ProgressCallback progress
to report algorithm progress and cancel from outside
Definition MRTunnelDetector.h:66
Definition MRFillHoleNicely.h:59
Definition MRMesh.h:23