#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRMeshTopology.h:23
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:753
tl::expected< T, E > Expected
Definition MRExpected.h:31
std::pair< VertId, VertId > VertPair
Definition MRMeshFwd.h:491
int eliminateDegree3Vertices(MeshTopology &topology, VertBitSet ®ion, FaceBitSet *fs=nullptr)
void fixMeshCreases(Mesh &mesh, const FixCreasesParams ¶ms={})
Finds creases edges and re-triangulates planar areas around them, useful to fix double faces.
Expected< FaceBitSet > findDisorientedFaces(const Mesh &mesh, const FindDisorientationParams ¶ms={})
returns all faces that are oriented inconsistently, based on number of ray intersections
EdgeId eliminateDegree3Dest(MeshTopology &topology, EdgeId e, FaceBitSet *region=nullptr)
bool hasMultipleEdges(const MeshTopology &topology)
Definition MRMeshFixer.h:23
Expected< void > fixMeshDegeneracies(Mesh &mesh, const FixMeshDegeneraciesParams ¶ms)
Fixes degenerate faces and short edges in mesh (changes topology)
VertBitSet findRepeatedVertsOnHoleBd(const MeshTopology &topology)
returns set bits for all vertices present on the boundary of a hole several times;
EdgeId eliminateDoubleTris(MeshTopology &topology, EdgeId e, FaceBitSet *region=nullptr)
Expected< UndirectedEdgeBitSet > findShortEdges(const MeshPart &mp, float criticalLength, ProgressCallback cb={})
finds edges having length <= criticalLength
void fixMultipleEdges(Mesh &mesh, const std::vector< MultipleEdge > &multipleEdges)
resolves given multiple edges, but splitting all but one edge in each group
Expected< FaceBitSet > findNotSmoothFaces(const MeshPart &mp, float minAngle=0.3f, ProgressCallback cb={})
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
EdgeId isVertexRepeatedOnHoleBd(const MeshTopology &topology, VertId v)
bool isDegree3Dest(const MeshTopology &topology, EdgeId e)
returns true if the destination of given edge has degree 3 and 3 incident triangles
Expected< std::vector< MultipleEdge > > findMultipleEdges(const MeshTopology &topology, ProgressCallback cb={})
int duplicateMultiHoleVertices(Mesh &mesh)
Duplicates all vertices having more than two boundary edges (and returns the number of duplications);...
VertBitSet findNRingVerts(const MeshTopology &topology, int n, const VertBitSet *region=nullptr)
finds vertices in region with complete ring of N edges
VertPair MultipleEdge
finds multiple edges in the mesh
Definition MRMeshFixer.h:21
void eliminateDoubleTrisAround(MeshTopology &topology, VertId v, FaceBitSet *region=nullptr)
Expected< FaceBitSet > findDegenerateFaces(const MeshPart &mp, float criticalAspectRatio=FLT_MAX, ProgressCallback cb={})
finds faces having aspect ratio >= criticalAspectRatio
FaceBitSet findHoleComplicatingFaces(const Mesh &mesh)
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Parameters for findDisorientedFaces function.
Definition MRMeshFixer.h:135
ProgressCallback cb
Definition MRMeshFixer.h:147
RayMode
Mode of detecting disoriented face.
Definition MRMeshFixer.h:138
@ Both
both direction should have correct number of intersections (positive - even; negative - odd)
Definition MRMeshFixer.h:141
@ Positive
positive (normal) direction of face should have even number of intersections
Definition MRMeshFixer.h:139
@ Shallowest
positive or negative (normal or -normal) direction (the one with lowest number of intersections) shou...
Definition MRMeshFixer.h:140
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 MRMeshFixer.h:145
Parameters structure for fixMeshCreases function.
Definition MRMeshFixer.h:119
float criticalTriAspectRatio
planar check is skipped for faces with worse aspect ratio
Definition MRMeshFixer.h:124
int maxIters
maximum number of algorithm iterations
Definition MRMeshFixer.h:127
float creaseAngle
edges with dihedral angle sharper this will be considered as creases
Definition MRMeshFixer.h:121
Definition MRMeshFixer.h:41
FaceBitSet * region
degenerations will be fixed only in given region, it is updated during the operation
Definition MRMeshFixer.h:60
ProgressCallback cb
Definition MRMeshFixer.h:69
float maxDeviation
maximum permitted deviation from the original surface
Definition MRMeshFixer.h:43
float maxAngleChange
Permit edge flips if it does not change dihedral angle more than on this value.
Definition MRMeshFixer.h:53
enum MR::FixMeshDegeneraciesParams::Mode Remesh
Mode
Definition MRMeshFixer.h:63
@ Remesh
if decimation does not succeed, perform subdivision too
Definition MRMeshFixer.h:65
@ Decimate
use decimation only to fix degeneracies
Definition MRMeshFixer.h:64
@ RemeshPatch
if both decimation and subdivision does not succeed, removes degenerate areas and fills occurred hole...
Definition MRMeshFixer.h:66
float criticalTriAspectRatio
Definition MRMeshFixer.h:50
float tinyEdgeLength
edges not longer than this value will be collapsed ignoring normals and aspect ratio checks
Definition MRMeshFixer.h:46
float stabilizer
Definition MRMeshFixer.h:57