#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
Definition MRMesh/MRMeshTopology.h:18
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:663
MRMESH_API int duplicateMultiHoleVertices(Mesh &mesh)
Duplicates all vertices having more than two boundary edges (and returns the number of duplications);...
bool hasMultipleEdges(const MeshTopology &topology)
Definition MRMesh/MRMeshFixer.h:23
MRMESH_API Expected< FaceBitSet > findDegenerateFaces(const MeshPart &mp, float criticalAspectRatio=FLT_MAX, ProgressCallback cb={})
finds faces having aspect ratio >= criticalAspectRatio
MRMESH_API VertBitSet findNRingVerts(const MeshTopology &topology, int n, const VertBitSet *region=nullptr)
finds vertices in region with complete ring of N edges
MRMESH_API FaceBitSet findHoleComplicatingFaces(const Mesh &mesh)
MRMESH_API bool isDegree3Dest(const MeshTopology &topology, EdgeId e)
returns true if the destination of given edge has degree 3 and 3 incident triangles
MRMESH_API Expected< FaceBitSet > findDisorientedFaces(const Mesh &mesh, const FindDisorientationParams ¶ms={})
returns all faces that are oriented inconsistently, based on number of ray intersections
MRMESH_API bool isEdgeBetweenDoubleTris(const MeshTopology &topology, EdgeId e)
returns true if the edge e has both left and right triangular faces and the degree of dest( e ) is 2
MRMESH_API int eliminateDegree3Vertices(MeshTopology &topology, VertBitSet ®ion, FaceBitSet *fs=nullptr)
MRMESH_API VertBitSet findRepeatedVertsOnHoleBd(const MeshTopology &topology)
returns set bits for all vertices present on the boundary of a hole several times;
MRMESH_API EdgeId isVertexRepeatedOnHoleBd(const MeshTopology &topology, VertId v)
MRMESH_API void fixMeshCreases(Mesh &mesh, const FixCreasesParams ¶ms={})
Finds creases edges and re-triangulates planar areas around them, useful to fix double faces.
MRMESH_API EdgeId eliminateDoubleTris(MeshTopology &topology, EdgeId e, FaceBitSet *region=nullptr)
VertPair MultipleEdge
finds multiple edges in the mesh
Definition MRMesh/MRMeshFixer.h:21
MRMESH_API EdgeId eliminateDegree3Dest(MeshTopology &topology, EdgeId e, FaceBitSet *region=nullptr)
MRMESH_API Expected< void > fixMeshDegeneracies(Mesh &mesh, const FixMeshDegeneraciesParams ¶ms)
Fixes degenerate faces and short edges in mesh (changes topology)
MRMESH_API Expected< std::vector< MultipleEdge > > findMultipleEdges(const MeshTopology &topology, ProgressCallback cb={})
MRMESH_API Expected< UndirectedEdgeBitSet > findShortEdges(const MeshPart &mp, float criticalLength, ProgressCallback cb={})
finds edges having length <= criticalLength
MRMESH_API void fixMultipleEdges(Mesh &mesh, const std::vector< MultipleEdge > &multipleEdges)
resolves given multiple edges, but splitting all but one edge in each group
MRMESH_API void eliminateDoubleTrisAround(MeshTopology &topology, VertId v, FaceBitSet *region=nullptr)
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:25
std::pair< VertId, VertId > VertPair
Definition MRMesh/MRMeshFwd.h:425
Parameters for findDisorientedFaces function.
Definition MRMesh/MRMeshFixer.h:131
ProgressCallback cb
Definition MRMesh/MRMeshFixer.h:143
RayMode
Mode of detecting disoriented face.
Definition MRMesh/MRMeshFixer.h:134
@ Both
both direction should have correct number of intersections (positive - even; negative - odd)
@ Positive
positive (normal) direction of face should have even number of intersections
@ Shallowest
positive or negative (normal or -normal) direction (the one with lowest number of intersections) shou...
enum MR::FindDisorientationParams::RayMode Shallowest
bool virtualFillHoles
if set - copy mesh, and fills holes for better quality in case of ray going out through hole
Definition MRMesh/MRMeshFixer.h:141
Parameters structure for fixMeshCreases function.
Definition MRMesh/MRMeshFixer.h:115
float criticalTriAspectRatio
planar check is skipped for faces with worse aspect ratio
Definition MRMesh/MRMeshFixer.h:120
int maxIters
maximum number of algorithm iterations
Definition MRMesh/MRMeshFixer.h:123
float creaseAngle
edges with dihedral angle sharper this will be considered as creases
Definition MRMesh/MRMeshFixer.h:117
Definition MRMesh/MRMeshFixer.h:37
FaceBitSet * region
degenerations will be fixed only in given region, it is updated during the operation
Definition MRMesh/MRMeshFixer.h:56
ProgressCallback cb
Definition MRMesh/MRMeshFixer.h:65
float maxDeviation
maximum permitted deviation from the original surface
Definition MRMesh/MRMeshFixer.h:39
float maxAngleChange
Permit edge flips if it does not change dihedral angle more than on this value.
Definition MRMesh/MRMeshFixer.h:49
enum MR::FixMeshDegeneraciesParams::Mode Remesh
Mode
Definition MRMesh/MRMeshFixer.h:59
@ Remesh
if decimation does not succeed, perform subdivision too
@ Decimate
use decimation only to fix degeneracies
@ RemeshPatch
if both decimation and subdivision does not succeed, removes degenerate areas and fills occurred hole...
float criticalTriAspectRatio
Definition MRMesh/MRMeshFixer.h:46
float tinyEdgeLength
edges not longer than this value will be collapsed ignoring normals and aspect ratio checks
Definition MRMesh/MRMeshFixer.h:42
float stabilizer
Definition MRMesh/MRMeshFixer.h:53
Definition MRMesh/MRMesh.h:22